aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java18
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java18
2 files changed, 30 insertions, 6 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
index 418336e3f..497e9f03b 100644
--- a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
+++ b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
@@ -202,8 +202,18 @@ public class WindowsWGLContext extends GLContextImpl {
// if no 3.2 is available creation fails already!
attribs[0+1] = 3;
attribs[2+1] = 2;
- attribs[6+0] = WGLExt.WGL_CONTEXT_PROFILE_MASK_ARB;
- attribs[6+1] = WGLExt.WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
+ if(glCaps.getGLProfile().isGL3bc()) {
+ attribs[6+0] = WGLExt.WGL_CONTEXT_PROFILE_MASK_ARB;
+ attribs[6+1] = WGLExt.WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
+ }
+ /**
+ * don't stricten requirements any further, even compatible would be fine
+ *
+ } else {
+ attribs[6+0] = WGLExt.WGL_CONTEXT_PROFILE_MASK_ARB;
+ attribs[6+1] = WGLExt.WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
+ }
+ */
hglrc = wglExt.wglCreateContextAttribsARB(drawable.getNativeWindow().getSurfaceHandle(), hglrc2, attribs, 0);
if(0==hglrc) {
if(DEBUG) {
@@ -212,7 +222,9 @@ public class WindowsWGLContext extends GLContextImpl {
// Try >= 3.1 forward compatible - last resort for GL3 !
attribs[0+1] = 3;
attribs[2+1] = 1;
- attribs[4+1] |= WGLExt.WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ if(!glCaps.getGLProfile().isGL3bc()) {
+ attribs[4+1] |= WGLExt.WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ }
attribs[6+0] = 0;
attribs[6+1] = 0;
} else if(DEBUG) {
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
index 84f32d43e..330d0a473 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
@@ -205,8 +205,18 @@ public abstract class X11GLXContext extends GLContextImpl {
// and verify with a None drawable binding (default framebuffer)
attribs[0+1] = 3;
attribs[2+1] = 2;
- // FIXME NV Bug: attribs[8+0] = GLX.GLX_CONTEXT_PROFILE_MASK_ARB;
- // FIXME NV Bug: attribs[8+1] = GLX.GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
+ if(glCaps.getGLProfile().isGL3bc()) {
+ attribs[8+0] = GLX.GLX_CONTEXT_PROFILE_MASK_ARB;
+ attribs[8+1] = GLX.GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
+ }
+ /**
+ * don't stricten requirements any further, even compatible would be fine
+ *
+ } else {
+ attribs[8+0] = GLX.GLX_CONTEXT_PROFILE_MASK_ARB;
+ attribs[8+1] = GLX.GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
+ }
+ */
context = glXExt.glXCreateContextAttribsARB(display, config.getFBConfig(), share, direct, attribs, 0);
if(0!=context) {
@@ -232,7 +242,9 @@ public abstract class X11GLXContext extends GLContextImpl {
// Try >= 3.1 forward compatible - last resort for GL3 !
attribs[0+1] = 3;
attribs[2+1] = 1;
- attribs[6+1] |= GLX.GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ if(!glCaps.getGLProfile().isGL3bc()) {
+ attribs[6+1] |= GLX.GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ }
attribs[8+0] = 0;
attribs[8+1] = 0;
}