diff options
author | Kenneth Russel <[email protected]> | 2004-07-15 21:42:04 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2004-07-15 21:42:04 +0000 |
commit | 554aeda4c46ee889e7ccb2cf1f988328b856bad1 (patch) | |
tree | 77fc602080c7fb786834399fc39cbef20e835623 /src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java | |
parent | 115b1d63d1e541b6ac3a4319c06cdc28f64c1975 (diff) |
Fixed build problems on Linux after bug fixes to context destruction
and recreation
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@137 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java')
-rw-r--r-- | src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java b/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java index 0290f8d44..2aa85e9f8 100644 --- a/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java +++ b/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java @@ -167,14 +167,17 @@ public class X11OffscreenGLContext extends X11GLContext { isDoubleBuffered = (X11GLContextFactory.glXGetConfig(display, vis, GLX.GLX_DOUBLEBUFFER, new int[1]) != 0); } - private void destroy() { - // Must destroy OpenGL context, pixmap and GLXPixmap - GLX.glXDestroyContext(display, context); - GLX.glXDestroyGLXPixmap(display, (int) drawable); - GLX.XFreePixmap(display, pixmap); - context = 0; - drawable = 0; - pixmap = 0; - GLContextShareSet.contextDestroyed(this); + protected void destroyImpl() { + if (context != 0) { + super.destroyImpl(); + // Must destroy OpenGL context, pixmap and GLXPixmap + GLX.glXDestroyContext(display, context); + GLX.glXDestroyGLXPixmap(display, (int) drawable); + GLX.XFreePixmap(display, pixmap); + context = 0; + drawable = 0; + pixmap = 0; + GLContextShareSet.contextDestroyed(this); + } } } |