From e8fbf3c0738c39005036c50e74dd20e4956f372f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 5 Oct 2009 17:54:51 -0700 Subject: EGL more query config trials; Avoid NPE if no config is chosen --- .../com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java') diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java index bd439eacb..5ab3c3ed5 100644 --- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java +++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java @@ -187,10 +187,17 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple caps.setOnscreen( 0 != (val[0] & EGL.EGL_WINDOW_BIT) ); caps.setPBuffer ( 0 != (val[0] & EGL.EGL_PBUFFER_BIT) ); } else { - return null; + throw new GLException("EGL_SURFACE_TYPE does not match !!!"); } } else { - throw new GLException("Could not determine EGL_SURFACE_TYPE"); + if(relaxed) { + if(DEBUG) { + System.err.println("Could not determine EGL_SURFACE_TYPE !!!"); + } + return null; + } else { + throw new GLException("Could not determine EGL_SURFACE_TYPE !!!"); + } } return caps; -- cgit v1.2.3