diff options
author | Kenneth Russel <[email protected]> | 2004-04-12 19:40:30 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2004-04-12 19:40:30 +0000 |
commit | dc4d980ec184d2372b5bde0384ff17cda845c0b5 (patch) | |
tree | ebed0e5ec948b347b6a4c13cf707cb9f3e6ec720 /src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java | |
parent | 4b7ef68fc3d3e836829a5a83245f0f0c874a3201 (diff) |
Fixed Javadoc problems
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@107 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 | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java b/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java index 7890982f3..8c88b0225 100644 --- a/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java +++ b/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java @@ -50,9 +50,6 @@ public class X11OffscreenGLContext extends X11GLContext { private int width; private int height; - // Display connection for use by all offscreen surfaces - private long staticDisplay; - public X11OffscreenGLContext(GLCapabilities capabilities, GLCapabilitiesChooser chooser, GLContext shareWith) { @@ -121,7 +118,7 @@ public class X11OffscreenGLContext extends X11GLContext { } protected synchronized boolean makeCurrent(Runnable initAction) throws GLException { - ensureDisplayOpened(); + display = X11GLContextFactory.getDisplayConnection(); if (pendingOffscreenResize) { if (pendingOffscreenWidth != width || pendingOffscreenHeight != height) { if (context != 0) { @@ -166,17 +163,7 @@ public class X11OffscreenGLContext extends X11GLContext { if (context == 0) { throw new GLException("Unable to create OpenGL context"); } - isDoubleBuffered = (glXGetConfig(vis, GLX.GLX_DOUBLEBUFFER, new int[1]) != 0); - } - - private void ensureDisplayOpened() { - if (staticDisplay == 0) { - staticDisplay = GLX.XOpenDisplay(null); - if (staticDisplay == 0) { - throw new GLException("Unable to open default display, needed for offscreen surface handling"); - } - } - display = staticDisplay; + isDoubleBuffered = (X11GLContextFactory.glXGetConfig(display, vis, GLX.GLX_DOUBLEBUFFER, new int[1]) != 0); } private void destroy() { |