aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-07 12:44:52 +0100
committerSven Gothel <[email protected]>2012-03-07 12:44:52 +0100
commit7b450386d876c52805295804c9ebf9a109ed5508 (patch)
treeacae1582fcc9e1538e6883e7e42e5e65f1a904c7 /src/jogl/classes/jogamp/opengl/egl/EGLContext.java
parent8385d98098f7804e5ee369d77963f5a7464a3e1f (diff)
GLContextImpl: Expose GL_RENDERER for impl. / EGLContext workaround Android 4.0.3, Pandaboard ES, PowerVR SGX 540 Bug
GLContextImpl: Expose GL_RENDERER for impl. - This allows reusing the 'early' string. EGLContext workaround Android 4.0.3, Pandaboard ES, PowerVR SGX 540 Bug - On mentioned platform, the app crashes when eglSwapInterval() has been called.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLContext.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
index dcef1cd3d..dc47799c1 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
@@ -50,6 +50,7 @@ import jogamp.opengl.GLContextImpl;
import jogamp.opengl.GLDrawableImpl;
import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.os.Platform;
import com.jogamp.gluegen.runtime.ProcAddressTable;
import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
@@ -274,8 +275,16 @@ public abstract class EGLContext extends GLContextImpl {
}
protected void setSwapIntervalImpl(int interval) {
- if (EGL.eglSwapInterval(((EGLDrawable)drawable).getDisplay(), interval)) {
- currentSwapInterval = interval ;
+ // FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // eglSwapInterval(..) issued:
+ // Android 4.0.3 / Pandaboard ES / PowerVR SGX 540: crashes
+ // FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ if( ! ( Platform.OSType.ANDROID == Platform.getOSType() && getGLRendererString(true).contains("powervr") ) ) {
+ if (EGL.eglSwapInterval(((EGLDrawable)drawable).getDisplay(), interval)) {
+ currentSwapInterval = interval ;
+ }
+ } else if(DEBUG) {
+ System.err.println("Ignored: eglSwapInterval("+interval+") - cause: OS "+Platform.getOSType() + " / Renderer " + getGLRendererString(false));
}
}