Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: Announcing: joglutils project on: 2008-03-11 23:17:15
Quote from: Z-Knight
I'd like to add one more thing...Jerome has been quite helpful in answering many of my questions on the 3DS loader topic in the past and I used his exceptional 3DS loader to help diagnose the issue with the joglutils loader.  In particular the ability of his loader to display all of the nodes, faces, normals, etc from within the viewer he has helped me figure out what the joglutils loader was reading incorrectly and where.  Thank you very much....for those interested, here is a link to Jerome's site:  http://jerome.jouvie.free.fr/index.php  If you go to his OpenGL Projects (Project 3) you can also use his model loader/viewer.

Thanks  Smiley
Also, just in case that someone could be interested, there is also a (new) utility for map edition : Map/World Editor (Project 5). I've starten this tool just few times ago, but it grows a little day-by-day. For more informations, just visit my pages.
2  Java Game APIs & Engines / JOGL Development / Re: Announcing: joglutils project on: 2008-03-10 22:44:45
Did you render your model with display lists ?
For my little experience rendering 3ds models, the highest frame rate I get is not with display list.
For 3ds models made of lot of different meshes and with high number of vertices, I generally got better results with vertex array (and even more with vbo).

Here is a result that may (or may not) be usefull for you : Direct Mode : ~3 fps; Display List : 4,5 fps; Vertex Array : 14 fps; Vertex Buffered Object (VBO) : 36 fps
I've made it with a 3ds model made of 500,000 vertices (ie 166,600 triangles), having 40 different materials in 560 meshes and displayed on a 1200x800 frame.


You can also optimize the model by :
 - sorting the meshes inside the model with the same material (ie same texture ...) and render them at the same time (ie in the same 'packet' of data)
 - pre-transform the meshes at loading time to save some possible glMultMatrix and a push/pop (sometimes there is a different transform for each meshes inside a model or a mesh hierarchy with multiple levels).
 - don't send unecessary datas (ie normal if no lighting is used ...).
 - ...

Tell me if that's usefull for you Wink
3  Java Game APIs & Engines / JOGL Development / Re: Bad texture with gluBuild2DMipmaps & jogl.glu.nojava=false on: 2007-05-14 09:00:30
Here is a test file.

The picture file (378x256) can be found here :
 http://jerome.jouvie.free.fr/downloads/PLATEOX2.bmp

I'm looking at reporting the bug on the issue tracker.

EDIT: Bug reported as Issue #302
4  Java Game APIs & Engines / JOGL Development / Re: Bad texture with gluBuild2DMipmaps & jogl.glu.nojava=false on: 2007-05-09 09:03:02

This is the same with final 1.1.0.
I writting a little example and I while post the bug report.
5  Java Game APIs & Engines / JOGL Development / Bad texture with gluBuild2DMipmaps & jogl.glu.nojava=false on: 2007-05-03 11:11:04
Hi,

I've got a texture which is badly converted to a texture with gluBuild2DMipmaps.
A black line appears at the top of the picture, which is not present in the source picture.

By disabling java implementation of glu with -Djogl.glu.nojava=true, the texture is well displayed.
By using glTexImage2D, the black line also did not appears and the texture is ok.
Also, drawing it into a BufferedImage (with datas passed to OpenGl) is good (no black line).


Picture file (378x256) can be found here :
 http://jerome.jouvie.free.fr/downloads/PLATEOX2.bmp
Screenshots :
gluBuild2DMipmaps & jogl.glu.nojava=false http://jerome.jouvie.free.fr/downloads/gluBuild2DMipmaps.png
gluBuild2DMipmaps & jogl.glu.nojava=true, or glTexImage2D http://jerome.jouvie.free.fr/downloads/glTexImage2D.png


Can someone tell me if this issue come from JSR231. The version I use is the 1.1.0 RC3.
6  Java Game APIs & Engines / JOGL Development / Re: Error: Share a GLContext from a GLCanvas to a GLJPanel on: 2007-04-05 08:14:22

The last ati driver fix this problem  Smiley
7  Java Game APIs & Engines / JOGL Development / Re: Error: Share a GLContext from a GLCanvas to a GLJPanel on: 2007-04-03 12:52:46
I've got an ATI Radeon 9600, under windows 2000.
I've also tried in another machine with an ATI Rage 128 (also under Windows 2000) : same error.

I will try with an Nvidia ...

Edit: with an nvidia card, it's ok.
I will try with the last ati driver in date to know if this fix the problem.
8  Java Game APIs & Engines / JOGL Development / Re: Error: Share a GLContext from a GLCanvas to a GLJPanel on: 2007-04-03 08:19:06

Here is the small test  Wink

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
import java.awt.event.*;
import javax.swing.JFrame;

import javax.media.opengl.*;
import javax.media.opengl.glu.GLU;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JButton;

import com.sun.opengl.util.Animator;
import com.sun.opengl.util.GLUT;

public class GLContextSharing extends JFrame
{
   public static void main(String[] args)
   {
      new GLContextSharing().setVisible(true);
   }
   
   private GLCanvas glScene = null;
   private JPanel jContentPane = null;
   private JButton jCanvasB = null;
   private JButton jPanelB = null;

   public GLContextSharing()
   {
      super("Resizing a GLJPanel");
      initialize();
   }

   private void initialize()
   {
        this.setContentPane(getJContentPane());
      this.pack();
      this.setLocationRelativeTo(null);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
   }

   private JPanel getJContentPane()
   {
      if(jContentPane == null)
      {
         jContentPane = new JPanel();
         jContentPane.setLayout(new BorderLayout());
         jContentPane.add(getJPanelB(), BorderLayout.NORTH);
         jContentPane.add(getGlScene(), BorderLayout.CENTER);
         jContentPane.add(getJCanvasB(), BorderLayout.SOUTH);
      }
      return jContentPane;
   }
   private JButton getJCanvasB()
   {
      if(jCanvasB == null)
      {
         jCanvasB = new JButton();
         jCanvasB.setText("Share GLContext with a GLCanvas");
         jCanvasB.addActionListener(new java.awt.event.ActionListener(){
            public void actionPerformed(java.awt.event.ActionEvent e)
            {
               GLCanvas glCanvas = new GLCanvas(null, null,
                     getGlScene().getContext(),
                     getGlScene().getGraphicsConfiguration().getDevice());
                glCanvas.addGLEventListener(new Scene());
               
                JFrame frame = new JFrame("GLCanvas");
                frame.add(glCanvas);
                frame.setSize(200, 200);
                frame.setVisible(true);
               
                Animator animator = new Animator(glCanvas);
                animator.start();
            }
         });
      }
      return jCanvasB;
   }
   private JButton getJPanelB()
   {
      if(jPanelB == null)
      {
         jPanelB = new JButton();
         jPanelB.setText("Share GLContext with a GLJPanel");
         jPanelB.addActionListener(new java.awt.event.ActionListener(){
            public void actionPerformed(java.awt.event.ActionEvent e)
            {
                GLJPanel gljPanel = new GLJPanel(null, null,
                      getGlScene().getContext());
                gljPanel.addGLEventListener(new Scene());
               
                JFrame frame = new JFrame("GLJPanel [Try resizing the window]");
                frame.add(gljPanel);
                frame.setSize(200, 200);
                frame.setVisible(true);
               
                Animator animator = new Animator(gljPanel);
                animator.start();
            }
         });
      }
      return jPanelB;
   }
   private GLCanvas getGlScene()
   {
      if(glScene == null)
      {
         glScene = new GLCanvas();
         glScene.addGLEventListener(new Scene());
         glScene.setSize(400, 300);
      }
      return glScene;
   }
   
   private static int DISPLAY_LIST = -1;
   class Scene implements GLEventListener
   {
      private Animator animator;

      public void displayChanged(GLAutoDrawable glDrawable, boolean modeChanged, boolean deviceChanged){}
      public void reshape(GLAutoDrawable glDrawable, int x, int y, int width, int height)
      {
         final GL gl = glDrawable.getGL();
         final GLU glu = new GLU();

         if(height <= 0) height = 1;

         gl.glViewport(0, 0, width, height);
         gl.glMatrixMode(GL.GL_PROJECTION);
         gl.glLoadIdentity();
         glu.gluPerspective(45.0f, width / height, 0.1f, 1000.0f);
         gl.glMatrixMode(GL.GL_MODELVIEW);
         gl.glLoadIdentity();
      }

      public void init(GLAutoDrawable glDrawable)
      {
         final GL gl = glDrawable.getGL();
         
         gl.glEnable(GL.GL_LIGHT0);
         gl.glEnable(GL.GL_LIGHTING);
         gl.glDepthFunc(GL.GL_LEQUAL);
         gl.glEnable(GL.GL_DEPTH_TEST);
         
         if(DISPLAY_LIST == -1)
         {
            DISPLAY_LIST = gl.glGenLists(1);
            gl.glNewList(DISPLAY_LIST, GL.GL_COMPILE);
               gl.glColor3f(0.5f, 0.5f, 0.5f);
               new GLUT().glutSolidTeapot(1.0f);
            gl.glEndList();
         }
         
         animator = new Animator(glDrawable);
         animator.start();
      }
     
      public void display(GLAutoDrawable glDrawable)
      {
         final GL gl = glDrawable.getGL();
         
         gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
         gl.glLoadIdentity();
         gl.glTranslatef(0.0f, 0.0f, -5.0f);
         
         if(gl.glIsList(DISPLAY_LIST))
            gl.glCallList(DISPLAY_LIST);
      }
   }
}
9  Java Game APIs & Engines / JOGL Development / Re: Error: Share a GLContext from a GLCanvas to a GLJPanel on: 2007-04-02 08:32:09

Ok, I will post a simple test case soon.
10  Java Game APIs & Engines / JOGL Development / Error: Share a GLContext from a GLCanvas to a GLJPanel on: 2007-03-30 08:56:35

I share the GLContext from the main opengl scene in a GLCanvas with a secondary scene in a GLJPanel (for swing integration).

All is going well until the GLJPanel is resized. The resize event generate the exception below.

It appends with JSR-231 1.1.0 rc3 and the last nightly build (27/03/2007). Notice that if I use a GLCanvas instead of a GLJPanel, this does not occures.


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: wglShareLists(0x10000, 0x10002) failed: error code 0
   at com.sun.opengl.impl.windows.WindowsGLContext.create(WindowsGLContext.java:136)
   at com.sun.opengl.impl.windows.WindowsGLContext.makeCurrentImpl(WindowsGLContext.java:150)
   at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
   at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
   at javax.media.opengl.GLJPanel.paintComponent(GLJPanel.java:607)
   at javax.swing.JComponent.paint(JComponent.java:1022)
   at javax.swing.JComponent.paintChildren(JComponent.java:859)
   at javax.swing.JComponent.paint(JComponent.java:1031)
   at javax.swing.JComponent.paintChildren(JComponent.java:859)
   at javax.swing.JComponent.paint(JComponent.java:1031)
   at javax.swing.JComponent.paintChildren(JComponent.java:859)
   at javax.swing.JComponent.paint(JComponent.java:1031)
   at javax.swing.JComponent.paintChildren(JComponent.java:859)
   at javax.swing.JComponent.paint(JComponent.java:1031)
   at javax.swing.JComponent.paintChildren(JComponent.java:859)
   at javax.swing.JComponent.paint(JComponent.java:1031)
   at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
   at javax.swing.JComponent.paintChildren(JComponent.java:859)
   at javax.swing.JComponent.paintToOffscreen(JComponent.java:5111)
   at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
   at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
   at javax.swing.JComponent.paint(JComponent.java:1008)
   at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
   at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
   at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
   at java.awt.Container.paint(Container.java:1797)
   at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:734)
   at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
   at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
   at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
11  Java Game APIs & Engines / JOGL Development / wglUseFontBitmaps & wglUseFontOut support for on: 2005-01-17 06:00:46
Hello,


I've just create a little library to allow you to use these two WGL methods (missing to Jogl) :
     wglUseFontBitmaps
     wglUseFontOutlines
(WGL are for windows only)

This little add-on is compatible with both Jogl old-version and new version (ie JSR231).
It is located here :
http://jerome.jouvie.free.fr/OpenGl/Jogl/Jogl-AddOn.php

There are an example of the use of the library and screen shots.
I've also make some Jogl tutorials.

 Wink
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (48 views)
2014-04-15 18:08:23

BurntPizza (44 views)
2014-04-15 03:46:01

UprightPath (60 views)
2014-04-14 17:39:50

UprightPath (42 views)
2014-04-14 17:35:47

Porlus (58 views)
2014-04-14 15:48:38

tom_mai78101 (82 views)
2014-04-10 04:04:31

BurntPizza (140 views)
2014-04-08 23:06:04

tom_mai78101 (240 views)
2014-04-05 13:34:39

trollwarrior1 (200 views)
2014-04-04 12:06:45

CJLetsGame (207 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!