Bug 151

Summary: starting up the Animator before the GLJPanel has been shown result in an error
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P2    
Version: 1   
Hardware: All   
OS: windows   
Type: DEFECT SCM Refs:
Workaround: ---
Attachments: demo project
Version of test case which now works properly

Description Sven Gothel 2010-03-24 07:47:41 CET


---- Reported by bwaant 2005-03-27 01:18:22 ----

This error only happend with the newest Geforce videoboards.



---- Additional Comments From bwaant 2005-03-27 01:19:32 ----

Created an attachment
demo project




---- Additional Comments From bwaant 2005-03-27 01:22:27 ----

replacing the lines: final Animator animator = new Animator(canvas);
    animator.start(); into the methode SetGebouwData() it works fine. So the 
place (not in de constructor) of initiating the animator is crucial



---- Additional Comments From kbr 2005-05-06 17:46:37 ----

Created an attachment
Version of test case which now works properly




---- Additional Comments From kbr 2005-05-06 17:47:08 ----

The root cause of this error was the fact that
WindowsPbufferGLContext.destroyImpl() uses WGL extensions to clean up
resources associated with the pbuffer. Because these extensions are in
the public WGL interface, they are wrapped by the DebugGL. However, an
OpenGL context is not current at the time these routines are called,
and it is illegal to call glGetError() at those points. The DebugGL
pipeline was implicitly calling glGetError() after each of those
calls, leading to the failure.

This bug unmasked a couple of others. The code in the DebugGL needed a
recursion count to make sure that glGetError() didn't get called in an
infinite loop. Also, as a side effect of the fix for Issue 160,
calling getGL() on the GLJPanel outside of GLEventListener.init() was
causing a NullPointerException to be thrown. The GLJPanel has been
fixed to return null in this case, and the specification of
GLDrawable.getGL() has been improved. In order to make the behavior
between the GLCanvas and GLJPanel similar, the GL object is now reset
in the GLDrawable each time the underlying OpenGL context is
recreated. This allows end users to set up e.g. the DebugGL
unconditionally in their GLEventListener.init() method. The JOGL demos
have been changed to reflect this.

The test case has been updated with code similar to the originally
submitted test case (i.e., the Animator is started early) but which
now works.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:47 EDT  ---

This bug was previously known as _bug_ 151 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=151
Imported an attachment (id=45)
Imported an attachment (id=46)

The original submitter of attachment 45 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.
The original submitter of attachment 46 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.