aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-12-22 01:16:12 +0100
committerSven Gothel <[email protected]>2011-12-22 01:16:12 +0100
commitd225d0a8a16e362ddb14cb93c124eb06cf0ff05e (patch)
tree3570752984cf05edd889e72760ae52023b1f10c6 /src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
parent044bf81567f0cb809a5e42094c98e1306867d625 (diff)
GLJPanel: Fix dispose of backend (J2DOGL thread, no double dispose)..,
GLJPanel: - fix dispose of backend - proper J2DOGL thread - no double dispose - remove VERBOSE - no dispose regenerate flag - add @Overrride - more safe createContext(..) impl - setSynchronized(true); for all backends - ensure AbstractGraphicsDevice close() is being called GLDrawableHelper: - Clarify w/ isDisposeAction = null==initAction GLPbufferImpl: - ensure AbstractGraphicsDevice close() is being called Java2D: - remove VERBOSE -
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLPbufferImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLPbufferImpl.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
index e785d5734..ae83965e9 100644
--- a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
@@ -42,6 +42,8 @@ package jogamp.opengl;
import com.jogamp.common.util.locks.LockFactory;
import com.jogamp.common.util.locks.RecursiveLock;
+
+import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.NativeSurface;
import javax.media.opengl.GL;
import javax.media.opengl.GLAnimatorControl;
@@ -107,6 +109,8 @@ public class GLPbufferImpl implements GLPbuffer {
public void destroy() {
if(pbufferDrawable.isRealized()) {
+ final AbstractGraphicsDevice adevice = pbufferDrawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();
+
if (null != context && context.isCreated()) {
try {
drawableHelper.invokeGL(pbufferDrawable, context, disposeAction, null);
@@ -117,6 +121,10 @@ public class GLPbufferImpl implements GLPbuffer {
// drawableHelper.reset();
}
pbufferDrawable.destroy();
+
+ if(null != adevice) {
+ adevice.close();
+ }
}
}