summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java5
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java19
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);