summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLPbufferImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLPbufferImpl.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
index ae83965e9..10d5a3f27 100644
--- a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
@@ -99,28 +99,21 @@ public class GLPbufferImpl implements GLPbuffer {
return true;
}
- class DisposeAction implements Runnable {
- public void run() {
- // Lock: Covered by DestroyAction ..
- drawableHelper.dispose(GLPbufferImpl.this);
- }
- }
- DisposeAction disposeAction = new DisposeAction();
-
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);
+ drawableHelper.disposeGL(GLPbufferImpl.this, pbufferDrawable, context, null);
} catch (GLException gle) {
gle.printStackTrace();
}
- context.destroy();
+ context = null;
// drawableHelper.reset();
}
pbufferDrawable.destroy();
+ pbufferDrawable = null;
if(null != adevice) {
adevice.close();