diff options
author | Sven Gothel <[email protected]> | 2012-04-07 16:02:17 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-04-07 16:02:17 +0200 |
commit | 96ae8202621dfa1f7ae4995e7749d1b0d9918b54 (patch) | |
tree | 5095ed81de9a3adb8b8f009089fc463c1960d0a8 | |
parent | d1460514789288ad550cb7c8ea627da5f49eec07 (diff) |
GLMediaPlayer: Fix destruction (NPE) / Fix MovieSimple shader, no GL_OES_EGL_image_external for plain ES2.
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; |