diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11/glx/GLXUtil.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/x11/glx/GLXUtil.java | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/GLXUtil.java b/src/jogl/classes/jogamp/opengl/x11/glx/GLXUtil.java index 8b90d6887..7d03bbb88 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/GLXUtil.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/GLXUtil.java @@ -43,6 +43,20 @@ import com.jogamp.common.util.VersionNumber; public class GLXUtil { public static final boolean DEBUG = Debug.debug("GLXUtil"); + public static synchronized boolean isGLXAvailableOnServer(X11GraphicsDevice x11Device) { + if(null == x11Device) { + throw new IllegalArgumentException("null X11GraphicsDevice"); + } + if(0 == x11Device.getHandle()) { + throw new IllegalArgumentException("null X11GraphicsDevice display handle"); + } + boolean glXAvailable = false; + try { + glXAvailable = GLX.glXQueryExtension(x11Device.getHandle(), null, 0, null, 0); + } catch (Throwable t) { /* n/a */ } + return glXAvailable; + } + public static VersionNumber getGLXServerVersionNumber(long display) { int[] major = new int[1]; int[] minor = new int[1]; @@ -92,17 +106,6 @@ public class GLXUtil { return clientVersionNumber; } - public static synchronized boolean isGLXAvailable(long handle) { - if(0 == handle) { - throw new IllegalArgumentException("null X11 display handle"); - } - boolean glXAvailable = false; - try { - glXAvailable = GLX.glXQueryExtension(handle, null, 0, null, 0); - } catch (Throwable t) { /* n/a */ } - return glXAvailable; - } - public static synchronized void initGLXClientDataSingleton(X11GraphicsDevice x11Device) { if(null != clientVendorName) { return; // already initialized |