diff options
author | sg215889 <[email protected]> | 2009-07-29 20:03:56 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-29 20:03:56 -0700 |
commit | cd1c18244cec90575cdcc2039db42596d438cd90 (patch) | |
tree | 526c95735efe09e92dedbeec97c62e9fee9e9926 /src/jogl/classes/com/sun | |
parent | d0e39bee266f0b715fe7ef711faff4783835c3d5 (diff) |
eglBindAPI optional
Diffstat (limited to 'src/jogl/classes/com/sun')
-rwxr-xr-x | src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java index 653bddb9d..45fe0fcd3 100755 --- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java +++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java @@ -168,8 +168,15 @@ public abstract class EGLContext extends GLContextImpl { throw new GLException("Error: attempted to create an OpenGL context without a graphics configuration"); } - if(!EGL.eglBindAPI(EGL.EGL_OPENGL_ES_API)) { - throw new GLException("eglBindAPI to ES failed , error 0x"+Integer.toHexString(EGL.eglGetError())); + try { + // might be unavailable on EGL < 1.2 + if(!EGL.eglBindAPI(EGL.EGL_OPENGL_ES_API)) { + throw new GLException("eglBindAPI to ES failed , error 0x"+Integer.toHexString(EGL.eglGetError())); + } + } catch (GLException glex) { + if (DEBUG) { + glex.printStackTrace(); + } } EGLContext other = (EGLContext) GLContextShareSet.getShareContext(this); |