aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java')
-rwxr-xr-xsrc/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java19
1 files changed, 16 insertions, 3 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..cc4dafa4c 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);
@@ -218,7 +225,6 @@ public abstract class EGLContext extends GLContextImpl {
}
protected void updateGLProcAddressTable() {
- super.updateGLProcAddressTable();
if (DEBUG) {
System.err.println(getThreadName() + ": !!! Initializing EGL extension address table");
}
@@ -228,6 +234,7 @@ public abstract class EGLContext extends GLContextImpl {
eglExtProcAddressTable = new EGLExtProcAddressTable();
}
resetProcAddressTable(getEGLExtProcAddressTable());
+ super.updateGLProcAddressTable();
}
public synchronized String getPlatformExtensionsString() {
@@ -254,6 +261,12 @@ public abstract class EGLContext extends GLContextImpl {
}
}
+ protected void setSwapIntervalImpl(int interval) {
+ if (EGL.eglSwapInterval(drawable.getDisplay(), interval)) {
+ currentSwapInterval = interval ;
+ }
+ }
+
public abstract void bindPbufferToTexture();
public abstract void releasePbufferFromTexture();