summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/x11/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11/glx')
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index 79768d662..9af534f35 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -229,6 +229,16 @@ public class X11GLXContext extends GLContextImpl {
System.err.println(getThreadName()+": X11GLXContext.createContextARBImpl: "+getGLVersion(major, minor, ctp, "@creation") +
", handle "+toHexString(drawable.getHandle()) + ", share "+toHexString(share)+", direct "+direct);
}
+ final boolean ctDesktopGL = 0 == ( CTX_PROFILE_ES & ctp );
+ final boolean ctBwdCompat = 0 != ( CTX_PROFILE_COMPAT & ctp ) ;
+ final boolean ctFwdCompat = 0 != ( CTX_OPTION_FORWARD & ctp ) ;
+ final boolean ctDebug = 0 != ( CTX_OPTION_DEBUG & ctp ) ;
+ if( !ctDesktopGL ) {
+ if(DEBUG) {
+ System.err.println(getThreadName() + ": X11GLXContext.createContextARBImpl: GL ES not avail "+getGLVersion(major, minor, ctp, "@creation"));
+ }
+ return 0; // n/a
+ }
final GLDynamicLookupHelper dlh = getGLDynamicLookupHelper(major, ctp);
if( null == dlh ) {
if(DEBUG) {
@@ -244,10 +254,6 @@ public class X11GLXContext extends GLContextImpl {
", glXCreateContextAttribsARB: "+toHexString(glXExtProcAddressTable._addressof_glXCreateContextAttribsARB));
}
- final boolean ctBwdCompat = 0 != ( CTX_PROFILE_COMPAT & ctp ) ;
- final boolean ctFwdCompat = 0 != ( CTX_OPTION_FORWARD & ctp ) ;
- final boolean ctDebug = 0 != ( CTX_OPTION_DEBUG & ctp ) ;
-
final IntBuffer attribs = Buffers.newDirectIntBuffer(ctx_arb_attribs_rom);
attribs.put(ctx_arb_attribs_idx_major + 1, major);
attribs.put(ctx_arb_attribs_idx_minor + 1, minor);
@@ -334,6 +340,10 @@ public class X11GLXContext extends GLContextImpl {
"], fbCfg "+config.hasFBConfig()+" -> "+createContextARBAvailable+
"], shared "+sharedCreatedWithARB+"]");
}
+ if( glp.isGLES() ) {
+ throw new GLException(getThreadName()+": Unable to create OpenGL ES context on desktopDevice "+device+
+ ", config "+config+", "+glp+", shareWith "+toHexString(shareWithHandle));
+ }
if( !config.hasFBConfig() ) {
// not able to use FBConfig -> GLX 1.1