diff options
author | Sven Gothel <[email protected]> | 2014-09-19 19:20:48 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-20 06:20:51 +0200 |
commit | f51ccf9974a9a0479ef3c6c6692955ce3717682d (patch) | |
tree | ea974ea5575e3102f2bb8bbbbfb0976e4af7912c /src/test | |
parent | 7bc86f21b20ebb32564d4493a445d9a1dfedb118 (diff) |
FBOobject GLEL Tests: Remove redundant detachAllColorbuffer(gl) for init call
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java | 5 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java | 19 |
2 files changed, 6 insertions, 18 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java index 6cd97239a..4df959333 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java @@ -156,11 +156,6 @@ public class FBOMix2DemosES2 implements GLEventListener { } private void initFBOs(final GL gl, final GLAutoDrawable drawable) { - // remove all texture attachments, since MSAA uses just color-render-buffer - // and non-MSAA uses texture2d-buffer - fbo0.detachAllColorbuffer(gl); - fbo1.detachAllColorbuffer(gl); - fbo0.reset(gl, drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), numSamples, false); fbo1.reset(gl, drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), numSamples, false); if(fbo0.getNumSamples() != fbo1.getNumSamples()) { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java index 0c5d89e27..69319561d 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java @@ -138,14 +138,12 @@ public class TextureDraw02ES2ListenerFBO implements GLEventListener { st.useProgram(gl, false); + initFBOs(gl, drawable.getSurfaceWidth(), drawable.getSurfaceHeight()); + gl.glEnable(GL.GL_DEPTH_TEST); } private void initFBOs(final GL gl, final int width, final int height) { - // remove all texture attachments, since MSAA uses just color-render-buffer - // and non-MSAA uses texture2d-buffer - fbo0.detachAllColorbuffer(gl); - fbo0.reset(gl, width, height, numSamples, false); numSamples = fbo0.getNumSamples(); @@ -236,16 +234,11 @@ public class TextureDraw02ES2ListenerFBO implements GLEventListener { gl.setSwapInterval(swapInterval); // in case switching the drawable (impl. may bound attribute there) } - if( !fbo0.isInitialized() ) { - System.err.println("**** Reshape.Init: "+width+"x"+height); - initFBOs(gl, width, height); - } else { - System.err.println("**** Reshape.Reset: "+width+"x"+height); - if( keepTextureBound ) { - fbo0.unuse(gl); - } - resetFBOs(gl, width, height); + System.err.println("**** Reshape.Reset: "+width+"x"+height); + if( keepTextureBound ) { + fbo0.unuse(gl); } + resetFBOs(gl, width, height); fbo0.bind(gl); demo.reshape(drawable, x, y, width, height); |