From 630d43be7a8cccf28632fc1f7542bb484382d775 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 6 Oct 2012 07:19:37 +0200 Subject: Fix Bug 617 (part2): Workaround buggy GPU driver where FBO reattachment of Colorbuffer w/ diff size leads to GL_FRAMEBUFFER_UNSUPPORTED. This occured at least on: - OS X 10.6.8 - GL_RENDERER NVIDIA GeForce 7300 GT OpenGL Engine - GL_VERSION 2.1 NVIDIA-1.6.36 Remedy is to catch the exception @ GLFBODrawableImpl.reset(..) and switch over to fallback 'reset' method: FBO reattachment -> FBO complete recreation Of course, the FBO recreation is noticable slower, but at least it seems to work on the offending system. Not tested on the offending system, but manually provoked GLException on FBOObject to trigger fallback, which is working here. --- src/jogl/classes/com/jogamp/opengl/FBObject.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/com/jogamp') diff --git a/src/jogl/classes/com/jogamp/opengl/FBObject.java b/src/jogl/classes/com/jogamp/opengl/FBObject.java index 922225207..f40d44ff5 100644 --- a/src/jogl/classes/com/jogamp/opengl/FBObject.java +++ b/src/jogl/classes/com/jogamp/opengl/FBObject.java @@ -1869,7 +1869,10 @@ public class FBObject { detachRenderbufferImpl(gl, Attachment.Type.DEPTH_STENCIL, recreate ? DetachAction.RECREATE : DetachAction.DISPOSE); } if(ignoreStatus) { // post validate - updateStatus(gl); + /* if(true) { + throw new GLException("Simulating bug 617, reset FBO failure"); + } */ + updateStatus(gl); if(!isStatusValid()) { throw new GLException("detachAllImpl failed "+getStatusString()+", "+this); } -- cgit v1.2.3