aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
index e44be7509..394293bc0 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
@@ -262,7 +262,6 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
GLXUtil.initGLXClientDataSingleton(sharedDevice);
final String glXServerVendorName = GLX.glXQueryServerString(sharedDevice.getHandle(), 0, GLX.GLX_VENDOR);
- final VersionNumber glXServerVersion = GLXUtil.getGLXServerVersionNumber(sharedDevice);
final boolean glXServerMultisampleAvailable = GLXUtil.isMultisampleAvailable(GLX.glXQueryServerString(sharedDevice.getHandle(), 0, GLX.GLX_EXTENSIONS));
final GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP, false);
@@ -273,7 +272,14 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
final GLCapabilitiesImmutable caps = new GLCapabilities(glp);
final GLDrawableImpl sharedDrawable = createOnscreenDrawableImpl(createDummySurfaceImpl(sharedDevice, false, caps, caps, null, 64, 64));
sharedDrawable.setRealized(true);
-
+ final X11GLCapabilities chosenCaps = (X11GLCapabilities) sharedDrawable.getChosenGLCapabilities();
+ final boolean glxForcedOneOne = !chosenCaps.hasFBConfig();
+ final VersionNumber glXServerVersion;
+ if( glxForcedOneOne ) {
+ glXServerVersion = versionOneOne;
+ } else {
+ glXServerVersion = GLXUtil.getGLXServerVersionNumber(sharedDevice);
+ }
final GLContextImpl sharedContext = (GLContextImpl) sharedDrawable.createContext(null);
if (null == sharedContext) {
throw new GLException("Couldn't create shared context for drawable: "+sharedDrawable);
@@ -294,7 +300,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
System.err.println("SharedScreen: " + sharedScreen);
System.err.println("SharedContext: " + sharedContext + ", madeCurrent " + madeCurrent);
System.err.println("GLX Server Vendor: " + glXServerVendorName);
- System.err.println("GLX Server Version: " + glXServerVersion);
+ System.err.println("GLX Server Version: " + glXServerVersion + ", forced "+glxForcedOneOne);
System.err.println("GLX Server Multisample: " + glXServerMultisampleAvailable);
System.err.println("GLX Client Vendor: " + GLXUtil.getClientVendorName());
System.err.println("GLX Client Version: " + GLXUtil.getClientVersionNumber());