aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/native/audio
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-25 03:01:27 +0100
committerSven Gothel <[email protected]>2010-11-25 03:01:27 +0100
commit16bb638603c01e3d3ed94c63550b7c2b18ad23a2 (patch)
tree0be8cb4e669e3bc6ea6f5fd272f3564b382a8bd5 /src/jogl/native/audio
parentce3508aa66b9a40974cce2988094d0edc68b30f4 (diff)
Fix GLCanvas Recreation - Regression 96af6c9bf2d683115996
96af6c9bf2d683115996 moved the creation of the AWTGraphicsConfiguration, GLDrawable and GLContext to the GLCanvas constructor. This disabled recreation, removeNotify()/addNotify() after 1st addNotify(), since the drawable/context were already set to null. Smart recreation, ie not destroying the resources completly: 1 - drawable 2 - context 3 - AWTGraphicsConfiguration's Device (X11: Display) is not possible, since removeNotify() is the only destroy notification we have from AWT, which would leave the above resources open -> leak. This is especially true for (3), since the device is created 'on the fly'. In NEWT we use lazy creation/destroy and are able to keep the references alive. A remodelling of AbstractGraphicsConfiguration would be required, which indeed would be overkill. Simple solution is to move the creation block back to addNotify() but before 'super.addNotify()', since it needs our chosen AWTGraphicsConfiguration. Also flagging sendReshape in addNotify(). Added test case com.jogamp.test.junit.jogl.awt.TestAWT03GLCanvasRecreate01.
Diffstat (limited to 'src/jogl/native/audio')
0 files changed, 0 insertions, 0 deletions