aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-04-07 16:02:17 +0200
committerSven Gothel <[email protected]>2012-04-07 16:02:17 +0200
commit96ae8202621dfa1f7ae4995e7749d1b0d9918b54 (patch)
tree5095ed81de9a3adb8b8f009089fc463c1960d0a8 /src
parentd1460514789288ad550cb7c8ea627da5f49eec07 (diff)
GLMediaPlayer: Fix destruction (NPE) / Fix MovieSimple shader, no GL_OES_EGL_image_external for plain ES2.
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java8
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.fp3
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.vp1
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2_exttex.fp1
4 files changed, 5 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java
index df4cc7625..f6fc20afe 100644
--- a/src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java
+++ b/src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java
@@ -279,9 +279,11 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
protected void removeAllImageTextures(GLContext ctx) {
if(null != texFrames) {
for(int i=0; i<textureCount; i++) {
- final TextureFrame imgTex = texFrames[i];
- destroyTexImage(ctx, imgTex);
- texFrames[i] = null;
+ final TextureFrame imgTex = texFrames[i];
+ if(null != imgTex) {
+ destroyTexImage(ctx, imgTex);
+ texFrames[i] = null;
+ }
}
}
texFrameMap.clear();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.fp
index 466d9ecd7..e3b9eea04 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.fp
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.fp
@@ -2,10 +2,7 @@
#version 100
-#extension GL_OES_EGL_image_external : enable
-
precision mediump float;
-precision mediump int;
uniform sampler2D mgl_ActiveTexture;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.vp
index ca5d69ebb..6708d546e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.vp
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2.vp
@@ -3,6 +3,5 @@
#version 100
precision mediump float;
-precision mediump int;
#include moviesimple_xxx.vp \ No newline at end of file
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2_exttex.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2_exttex.fp
index 96efaf357..39b0fe8d0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2_exttex.fp
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/moviesimple_es2_exttex.fp
@@ -5,7 +5,6 @@
#extension GL_OES_EGL_image_external : require
precision mediump float;
-precision mediump int;
uniform samplerExternalOES mgl_ActiveTexture;