From 5acb70d3d301fe66e4d03037325a91528e4c2c1d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 30 Aug 2015 06:26:29 +0200 Subject: 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. --- src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/jogl/classes/jogamp/opengl/macosx') 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 ) ; -- cgit v1.2.3