From d6d9db6334193ec1cf3c1f00b2a9e154a15d779f Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Tue, 1 Apr 2014 16:43:59 +0200
Subject: X11/WGL GLContext Impl: setGLFunctionAvailability(..) w/
 withinGLVersionsMapping:=true if null == sharedContext

.. otherwise no quirk could be set on non ARB ctx GL implementations.

null == sharedContext, always for first context creation, i.e. indeed within GL version mapping.
---
 src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/jogl/classes/jogamp/opengl/x11/glx')

diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index 94620c4fc..57d39d533 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -313,7 +313,7 @@ public class X11GLXContext extends GLContextImpl {
         if ( !glXMakeContextCurrent(display, drawable.getHandle(), drawableRead.getHandle(), contextHandle) ) {
           throw new GLException(getThreadName()+": Error making temp context(0) current: display "+toHexString(display)+", context "+toHexString(contextHandle)+", drawable "+drawable);
         }
-        if( !setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, false /* withinGLVersionsMapping */) ) { // use GL_VERSION
+        if( !setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, null == sharedContext /* withinGLVersionsMapping */) ) { // use GL_VERSION
             throw new InternalError("setGLFunctionAvailability !strictMatch failed");
         }
         isDirect = GLX.glXIsDirect(display, contextHandle);
@@ -345,7 +345,7 @@ public class X11GLXContext extends GLContextImpl {
         if ( !glXMakeContextCurrent(display, drawable.getHandle(), drawableRead.getHandle(), temp_ctx) ) {
           throw new GLException(getThreadName()+": Error making temp context(1) current: display "+toHexString(display)+", context "+toHexString(temp_ctx)+", drawable "+drawable);
         }
-        setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, false /* withinGLVersionsMapping */); // use GL_VERSION
+        setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT, false /* strictMatch */, null == sharedContext /* withinGLVersionsMapping */); // use GL_VERSION
         glXMakeContextCurrent(display, 0, 0, 0); // release temp context
         if( !createContextARBTried ) {
             // is*Available calls are valid since setGLFunctionAvailability(..) was called
-- 
cgit v1.2.3