summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java3
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java9
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java15
3 files changed, 9 insertions, 18 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 34e247cdd..93c0b69b8 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -820,6 +820,9 @@ public abstract class GLContextImpl extends GLContext {
*/
protected final long createContextARB(final long share, final boolean direct)
{
+ if( GLProfile.disableOpenGLARBContext ) {
+ return 0;
+ }
final AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration();
final AbstractGraphicsDevice device = config.getScreen().getDevice();
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
index 9c5a5b272..00f5687a5 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
@@ -360,16 +360,11 @@ public class WindowsWGLContext extends GLContextImpl {
}
}
} else {
- if( glCaps.getGLProfile().isGL3() ) {
- WGL.wglMakeCurrent(0, 0);
- WGL.wglDeleteContext(temp_ctx);
- throw new GLException(getThreadName()+": WindowsWGLContex.createContextImpl ctx !ARB, profile > GL2 requested (OpenGL >= 3.0.1). Requested: "+glCaps.getGLProfile()+", current: "+getGLVersion());
- }
if(DEBUG) {
- System.err.println("WindowsWGLContext.createContext failed, fall back to !ARB context "+getGLVersion());
+ System.err.println("WindowsWGLContext.createContext via ARB failed, fall back to !ARB context "+getGLVersion());
}
- // continue with temp context for GL < 3.0
+ // continue with temp context
contextHandle = temp_ctx;
if ( !wglMakeContextCurrent(drawable.getHandle(), drawableRead.getHandle(), contextHandle) ) {
WGL.wglMakeCurrent(0, 0);
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index d4c3abc49..d93b2feb0 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -51,7 +51,6 @@ import javax.media.nativewindow.NativeSurface;
import javax.media.opengl.GLCapabilitiesImmutable;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLException;
-import javax.media.opengl.GLProfile;
import jogamp.nativewindow.x11.X11Lib;
import jogamp.nativewindow.x11.X11Util;
@@ -298,13 +297,12 @@ public class X11GLXContext extends GLContextImpl {
}
final GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
- final GLProfile glp = glCaps.getGLProfile();
if( !config.hasFBConfig() ) {
// not able to use FBConfig -> GLX 1.1
forceGLXVersionOneOne();
- if(glp.isGL3()) {
- throw new GLException(getThreadName()+": Unable to create OpenGL >= 3.1 context");
+ if(glCaps.getGLProfile().isGL3()) {
+ throw new GLException(getThreadName()+": Unable to create OpenGL >= 3.1 context w/o FBConfig");
}
contextHandle = GLX.glXCreateContext(display, config.getXVisualInfo(), shareWithHandle, direct);
if ( 0 == contextHandle ) {
@@ -380,16 +378,11 @@ public class X11GLXContext extends GLContextImpl {
}
}
} else {
- if( glp.isGL3() ) {
- glXMakeContextCurrent(display, 0, 0, 0);
- GLX.glXDestroyContext(display, temp_ctx);
- throw new GLException(getThreadName()+": X11GLXContext.createContextImpl ctx !ARB, profile > GL2 requested (OpenGL >= 3.0.1). Requested: "+glp+", current: "+getGLVersion());
- }
if(DEBUG) {
- System.err.println(getThreadName()+": X11GLXContext.createContextImpl failed, fall back to !ARB context "+getGLVersion());
+ System.err.println(getThreadName()+": X11GLXContext.createContextImpl via ARB failed, fall back to !ARB context "+getGLVersion());
}
- // continue with temp context for GL <= 3.0
+ // continue with temp context
contextHandle = temp_ctx;
if ( !glXMakeContextCurrent(display, drawable.getHandle(), drawableRead.getHandle(), contextHandle) ) {
glXMakeContextCurrent(display, 0, 0, 0);