diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java index e38aabef8..8d1717e75 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java @@ -228,6 +228,22 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { } @Override + public boolean isDeviceSupported(String connection) { + final boolean res; + final X11GraphicsDevice x11Device = new X11GraphicsDevice(X11Util.openDisplay(connection), AbstractGraphicsDevice.DEFAULT_UNIT, true /* owner */); + x11Device.lock(); + try { + res = GLXUtil.isGLXAvailableOnServer(x11Device); + } finally { + x11Device.unlock(); + } + if(DEBUG) { + System.err.println("GLX "+(res ? "is" : "not")+" available on device/server: "+x11Device); + } + return res; + } + + @Override public SharedResourceRunner.Resource createSharedResource(String connection) { final X11GraphicsDevice sharedDevice = new X11GraphicsDevice(X11Util.openDisplay(connection), AbstractGraphicsDevice.DEFAULT_UNIT, true /* owner */); sharedDevice.lock(); |