aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/macosx/cgl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-08-30 06:26:29 +0200
committerSven Gothel <[email protected]>2015-08-30 06:26:29 +0200
commit5acb70d3d301fe66e4d03037325a91528e4c2c1d (patch)
tree971c01c0a098b1ad12ea2ac6fecbf3b422ee486c /src/jogl/classes/jogamp/opengl/macosx/cgl
parent18e487fdfe6f27564d976aa3a568d0ddc272d8ba (diff)
Bug 1203: Add missing constraints in desktop *GLContext.create* methods: Bail out if GL ES is requested ; Fix test case
*GLContext.createImpl(..) shall throw an GLException: *GLContext.createContextARBImpl(..) shall return 0: - Desktop implementation: if GL ES is requested - EGL implementation: if GL Desktop is requested, but not available Otherwise GLContextImpl may mistake a desktop context for an ES one. +++ Fix unit test TestGLAutoDrawableFactoryGLProfileDeviceNEWT.test11ES2OnDesktop(): We have to query the factory by desired profile, since the desktop factory cannot produce an GL ES context.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx/cgl')
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index 6a042b615..3c76dc212 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -109,6 +109,9 @@ public class MacOSXCGLContext extends GLContextImpl
}
static boolean isGLProfileSupported(final int ctp, final int major, final int minor) {
+ if( 0 != ( CTX_PROFILE_ES & ctp ) ) {
+ return false;
+ }
final boolean ctBwdCompat = 0 != ( CTX_PROFILE_COMPAT & ctp ) ;
final boolean ctCore = 0 != ( CTX_PROFILE_CORE & ctp ) ;