Newbie here with JOGL (but with 20+ years programming experience).
Summary: I have tried many of the JOGL demos available and this is what occurs:
- The initial render happens successfully.
- Then: NOTHING. Subsequent renders simply don’t do anything.
In the debugger, I traced it, and the display() callback is indeed getting called, the appropriate items are being changed, but then after it returns, and the swapBuffer() call is made by GLDrawableHelper, no change on the screen. Ever. The display just sits there with the initial image drawn but refuses to give any new updates to it.
But its even weirder: if I obscure the screen, then put a break in the relevant ‘display()’ routine, and trace it back to swapBuffer(), the image does come back after the swapBuffer() is called. But its the OLD initial image, not the image currently represented by the objects in the code. For example, the ‘diamond’ square is initially colored blue. The code will change it to green. But subsequent renders always show it as that initial blue. It is as if it has hold of an old buffer that it continually uses, and won’t swap any new buffers into place. But I don’t see anything weird or wrong anywhere.
Notes:
- The regular C demos to OpenGL work fine. I downloaded and ran the ‘Cube’ demo which displays an animated rotating cube. No problem.
The following demos I downloaded and tweaked successfully so that they compiled from the old 1.1.1 formats to the new JS231 formats. That is, I had to do things like global replace net.java.games.jogl with javax.media.opengl:
- The tetrahedron example I copied from the wiki. http://en.wikipedia.org/wiki/Java_OpenGL
- Kevin Conroy’s tutorial from http://www.cs.umd.edu/~meesh/kmconroy/JOGLTutorial/
- Pepe & Lizzie’s port of the Nehe tutorials (http://pepijn.fab4.be/software/nehe-java-ports/)
I ran all these tutorials, including the first 10 of nehe…same thing: the initial render happens, but then no matter what you do, nothing else renders. The appropriate objects are indeed being modified, but it has no effect on the screen.
Stats:
- I am running on an i686 linux ubuntu machine.
- Jvm: java-6-sun
- OpenGL: libglut.so.3.8.0
- Jogl: 1.1.1
Can anybody give me a clue as what else I can try? Or what thing in my environment to check?
I played around with set auto swap buffer mode, hardware acceleration mode, ensuring I am calling glFinish() and even tried glFlush(), but none of that helped.
I looked around a fair bit on the web, and I am surprised that nobody else has encountered this.
??
Thanks,
Doug