With Gl4java I’ve done some mini OpenGL apps. Now I’d like to move to Jogl. The short note http://jogl.dev.java.net/source/browse/jogl/doc/differences-from-gl4java.txt is helpful, but there a few problems I don’t understand.
[*]“No more GLAnimCanvas/GLAnimJPanel variants. To perform animation, attach an Animator to a GLDrawable.”
Ok, that’s clear. However, with Gl4java’s GLAnimCanvas one could do:
GLAnimCanvas canv = GLDrawableFactory.getFactory().createGLAnimCanvas(...);
canv.setUseRepaint(false);
canv.setAnimateFps(25);
When, for example, 25 frames per second did do the job.
Is such fine tuning also possible with Jogl? Or does Jogl’s Animator just call diplay() as often as possible? (Which is ok for most model-view-controller-games.)
[*]“GLContext is no longer exposed in the public API.”
Ok, no problem, expect: at the end of the display() methode in Gl4java one swaped the double buffer via:
GLContext mycont;
mycont.gljSwap();
How do you do this in Jogl?
Also, on this topic: when in Jogl I issue these lines:
GLCapabilities kap = new GLCapabilities();
kap.setDoubleBuffered(true);
kap.setStereo(false);
GlKanvas mycanv = GLDrawableFactory.getFactory().createGLCanvas(kap);
Then does Jogl use double buffering? When mycanv is in a full-screen windows, does this mean the good old Hardware page flipping we all know and love from C(++) OpenGL?
[*]“No GLEnum class. Use GL.[GL_CONSTANT_NAME].”
Whoops. Ok, this is more Java? I don’t know, I’m no expert. However I liked the GLEnum class much, because it reads more OpenGL like. But so what. It’s nice to see Jogl growing. Good job, you people doing it.
Oh, so many questions. Thanks in advance.
-ric