diff options
author | Sven Gothel <[email protected]> | 2009-10-18 07:59:08 -0700 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-10-18 07:59:08 -0700 |
commit | 372767d3faa62d6e95dd8e9ad5c3105bf9614f3d (patch) | |
tree | 6e9a5f315004152a0c03dd468fc17ed5761c9bac /src/jogl/classes/com/sun/opengl/impl/windows | |
parent | e4b0e57b9fe28296fcd8d9eb372242c33643886b (diff) |
Add OpenGL 3.x compatibility profile GL3bc,
where 'bc' is not a religious remark,
but simply means 'backward compatible' :)
GL3bc := GL2 + GL3,
hence the interface does not define any new values or methods.
Moved GL3's 3.1 part from gl3.h to gl3ext.h,
so it can be included in gl3bc.c, besides gl2.h.
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/windows')
-rw-r--r-- | src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java | 18 |
1 files changed, 15 insertions, 3 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) { |