JOGL Basic Issues
Return to the main FAQ page for more questions and answers.
This is a general problem that all heavyweight components have when mixed with Swing. The Java3D FAQ Swing Section tips also work with JOGL (and any other heavyweight renderer, such as JMF).
JOGL appears to have some very weird internal setup timing that causes problems in odd ways. This exception comes when you have attempted to do something to the GLCanvas before adding it to another component that is not already visible. To avoid this, make sure you call setVisible(true) on the containing Frame/Window before adding the GLCanvas.
A problem that seems to be inherent in mixing swing with heavyweight components
on a Win32 system (Java3D suffers from the same problem, for example). This is
due to some interactions with DirectDraw. To get the rendering happening again,
set the following property on the command line to disable DirectDraw usage:
Typically this is a sign that the drivers have defaulted back to software rendering (particularly in the case of shaders). Alternatively, you may not be picking up the correct native drivers for your video card (on Win32, this seems to happen alarmingly often). Check that your drivers are up to date and that the features you want are supported in hardware. You may have to scale back your techniques to keep it in pure hardware.
[ j3d.org Home ]
[ Java OpenGL ]
[ Aviatrix3D ]
[ Tutorials ]
[ Books ]
[ Contact Us ]
Last Updated: $Date: 2010-01-27 21:23:17 -0800 (Wed, 27 Jan 2010) $