diff options
author | Sven Gothel <[email protected]> | 2014-09-19 19:20:48 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-19 19:20:48 +0200 |
commit | fce65d0b8887387bfb71bbfeea63bc7915163399 (patch) | |
tree | 7684577b8cfe3494e7a440a29db84727b3fa9786 | |
parent | 6c0288655368f0decdf309ca4a90fc60cbc29378 (diff) |
FBOobject GLEL Tests: Remove redundant detachAllColorbuffer(gl) for init call
-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); |