From 495a1fbd591dfd9c428d9be660c3db33b7cb7aae Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 21 Sep 2012 20:26:31 +0200 Subject: FBObject: Small cleanup of freeColorbufferImpl(gl, i) -> freeAllColorbufferImpl(gl) --- src/jogl/classes/com/jogamp/opengl/FBObject.java | 53 ++++++++++++------------ 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/src/jogl/classes/com/jogamp/opengl/FBObject.java b/src/jogl/classes/com/jogamp/opengl/FBObject.java index ca9e3d370..59d1c9fa6 100644 --- a/src/jogl/classes/com/jogamp/opengl/FBObject.java +++ b/src/jogl/classes/com/jogamp/opengl/FBObject.java @@ -60,6 +60,7 @@ import com.jogamp.opengl.FBObject.Attachment.Type; public class FBObject { protected static final boolean DEBUG = Debug.debug("FBObject"); private static final boolean forceMinimumFBOSupport = Debug.isPropertyDefined("jogl.fbo.force.min", true); + private static final boolean FBOResizeQuirk = false; private static enum DetachAction { NONE, DISPOSE, RECREATE }; @@ -1592,30 +1593,32 @@ public class FBObject { return colbuf; } - private final void freeColorbufferImpl(GL gl, int attachmentPoint) { - Colorbuffer colbuf = colorAttachmentPoints[attachmentPoint]; // shortcut, don't validate here - - if(null == colbuf) { - return; - } - - if(colbuf instanceof TextureAttachment) { - final TextureAttachment texA = (TextureAttachment) colbuf; - if( 0 != texA.getName() ) { - gl.glFramebufferTexture2D(GL.GL_FRAMEBUFFER, - GL.GL_COLOR_ATTACHMENT0 + attachmentPoint, - GL.GL_TEXTURE_2D, 0, 0); - gl.glBindTexture(GL.GL_TEXTURE_2D, 0); + private final void freeAllColorbufferImpl(GL gl) { + for(int i=0; i