aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/games/jogl/impl/macosx')
-rw-r--r--src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java b/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java
index 2a34709f2..22d12b575 100644
--- a/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java
+++ b/src/net/java/games/jogl/impl/macosx/MacOSXGLContext.java
@@ -172,6 +172,18 @@ public abstract class MacOSXGLContext extends GLContext
}
}
+ protected void destroyImpl() throws GLException {
+ if (nsContext != 0) {
+ if (!CGL.deleteContext(nsContext, null)) {
+ throw new GLException("Unable to delete OpenGL context");
+ }
+ if (DEBUG) {
+ System.err.println("!!! Destroyed OpenGL context " + nsContext);
+ }
+ nsContext = 0;
+ }
+ }
+
public abstract void swapBuffers() throws GLException;
protected long dynamicLookupFunction(String glFuncName) {