JOGL Advanced Issues
Return to the main FAQ page for more questions and answers.
makeCurrent() is not available as part of the JOGL API set, along with a number of the other GLX/WGL/AGL calls. There is ongoing debate within the JSR process about exactly how much of these calls should be exposed to the end user. The most frequent response has been that AWT provides a lot of synchronisation problems between the native rendering, the AWT peers (and by association, Swing), with the GL rendering context management.
If your application needs to do stuff with the GL context that is not part of the normal rendering loop, such as load textures and shaders, there are two possible alternative approaches. Firstly, rearchitect the application to shift the resource loading down into the render loop (display() callback from GLEventListener) to process them at the start of every frame. Secondly, create a zero-sized, undecorated Frame, and add separate GLCanvas that uses shared contexts, and have the loading done in that frame's callbacks.
Due to the implementation of JOGL, it is not possible to ensure that the pBuffer is initialised on the same frame as you create it. There is no known work around for this problem. The pBuffer will initialise itself at some random point of time in the future.
A timing issue with the setup of JOGL (this is becoming a common theme, no?). JOGL requires that you first set the render thread, and then add the listeners. If you do this the other way around, then you won't get any callbacks. See Issue 54 for more information.
[ j3d.org Home ]
[ Java OpenGL ]
[ Aviatrix3D ]
[ Tutorials ]
[ Books ]
[ Contact Us ]
Last Updated: $Date: 2010-01-27 21:23:17 -0800 (Wed, 27 Jan 2010) $