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/egl/EGLContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java') diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java index 1910fbe72..a9d025e01 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java @@ -170,7 +170,7 @@ public class EGLContext extends GLContextImpl { final boolean hasFullOpenGLAPISupport = factory.hasOpenGLDesktopSupport(); final boolean useKHRCreateContext = factory.hasDefaultDeviceKHRCreateContext(); - final boolean ctDesktopGL = 0 == ( GLContext.CTX_PROFILE_ES & ctp ); + 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 ) ; -- cgit v1.2.3