summaryrefslogtreecommitdiffstats
path: root/src/demos/testContextDestruction
Commit message (Collapse)AuthorAgeFilesLines
* Copied JOGL_2_SANDBOX r350 on to trunk; JOGL_2_SANDBOX branch is now closedKenneth Russel2009-06-151-0/+385
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@352 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Deleted obsolete source code in preparation for copying JOGL_2_SANDBOXKenneth Russel2009-06-151-362/+0
| | | | | | | on to trunk git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@351 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Renamed com.sun.opengl.utils to com.sun.opengl.util. Moved Kenneth Russel2006-01-131-1/+1
| | | | | | | | | | | TextureIO-related classes to com.sun.opengl.util.texture and TextureProvider, TextureWriter and format-specific readers to com.sun.opengl.util.texture.spi. Renamed BufferUtils to BufferUtil. Added ImageUtil and FileUtil. Cleaned up javadoc. Updated demos. Cleaned up some imports. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@165 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Made public API changes discussed with expert group to make core JOGLKenneth Russel2005-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API more toolkit-agnostic: 1. Decoupled instantiation of GLCanvas and GLJPanel objects from the GLDrawableFactory. GLCanvas and GLJPanel's constructors are now public and the associated factory methods have been removed from the GLDrawableFactory. 2. Changed the signature of GLDrawableFactory. chooseGraphicsConfiguration() to accept and return marker AbstractGraphicsDevice and AbstractGraphicsConfiguration interfaces, respectively. Defined new AWTGraphicsDevice and AWTGraphicsConfiguration wrapper classes simply wrapping the associated objects. An SWT port could define similar wrapper classes for its data types. 3. Allowed overriding of the specific GLDrawableFactory subclass instantiated through GLDrawableFactory.getFactory() by setting the system property "opengl.factory.class.name". For example, an SWT port might swap itself in by specifying the following system property on the command line: -Dopengl.factory.class.name=com.ibm.swt.opengl.SWTGLDrawableFactory Tested on Solaris/SPARC. Also fixed breakage on Solaris/SPARC due to recent split of jogl native library into jogl and jogl_awt pieces. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@146 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Merged JSR-231 branch on to the main JOGL trunk. The main trunk now Kenneth Russel2005-10-241-10/+10
| | | | | | | | contains the evolving JSR-231 Reference Implementation and the JSR-231 branch is permanently closed. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@144 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Javadoc fixesKenneth Russel2005-05-271-1/+1
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@82 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Fixed Issue 151: starting up the Animator before the GLJPanel has been shown ↵Kenneth Russel2005-05-071-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | result in an error 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 in the bug report will be updated with code similar to the originally submitted test case (i.e., the Animator is started early) but which now works. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@71 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Fixed bug in demos pointed out by chrisDUPUIS on javagaming.org forums Kenneth Russel2005-02-281-1/+6
| | | | | | | | | where we were creating multiple DebugGLs in particular in the TestContextDestruction demo, which was the cause of the slowdown in that demo git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@63 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* Fixed problem in demos introduced in 1.1 b08 where windowClosing Kenneth Russel2005-02-141-2/+9
| | | | | | | events were not properly waiting for the Animator to stop. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@55 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
* This putback attempts to address the following issues: Kenneth Russel2004-06-191-0/+355
Issue 59: GLContext Leak Issue 67: Java/Jogl app hangs some systems, not others, during reshape. Issue 69: Error on window resize Issue 89: Losing Backbuffer when Resizing/Moving a window The primary change is to support handing off of the display() implementation to the AWT event queue thread via a new class called SingleThreadedWorkaround in the impl package. This was done to cause the AWT's reshape code to execute on the same thread as all other OpenGL rendering without changing the threading model (e.g., Animator and the ability to manually call display()) visible to the end user. This set of changes appears to work around the problems seen on ATI cards with random corruption when resizing animating windows due to multithreading bugs in the drivers. More testing by a larger community will confirm this fix. Currently the workaround is enabled by default on ATI cards. A secondary but related change is to properly destroy the OpenGL context when a heavyweight component is removed from its container. In order to implement the above workaround, it was necessary to override addNotify and removeNotify to properly track whether GLCanvases were realized; at that point it was a fairly small step to properly delete and recreate OpenGL contexts. The previous heuristics which attempted to determine when a heavyweight had been realized have been removed. A new demo, TestContextDestruction, exercises the new functionality. It does still appear to exhibit resource leaks, however; removing and re-adding the GLCanvas from its parent multiple times causes the system to eventually slow down significantly. More work is needed in this area. However, the demo does now execute as opposed to throwing an exception which was the previous behavior. The current code has been tested on Windows on NVidia hardware with all existing demos with the workaround both enabled and disabled, and on ATI hardware with the existing compatible demos with the workaround enabled. The new abstract method in GLContext, destroyImpl(), has been implemented but not yet tested on X11 and Mac OS X. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@32 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4