Hi Robert,
I've just has a look at your changed RenderStage. The changed code is below. Is there a reason why the #if !FORCE_COLOR_ATTACHMENT which disables the draw and read buffer is done after the FBO apply? I looks to me that one could simply have an #ifdef/#else. I do also wonder whether this is glDrawBuffer( GL_NONE ); etc. is even needed as well - as wouldn't the Camera provide the appropriate settings via the Read and DrawBuffer fields.
Frankly, this is something that puzzles me as well. I wrote this code only to test if color attachment enforcement could be easily removed. It was never intended as formal submission. It did it a year ago and I do not remember why I have added glDrawBuffer( GL_NONE ); glReadBuffer( GL_NONE ) calls. I suppose I did it because original attempt did not work as intended.
Ok I think I recall what was my goal. If there was no color attachment I wanted to make sure glDrawBuffer and glReadBuffer are set to NONE because otherwise OpenGL would assume that they are set to colorbuffers of backbuffer/frontbuffer. And I did it after fbo->apply because I thought that fbo->apply may call these functions with other flags.
It needs to be verified if I was right and this part was really needed. As I said before this was not intended as submission and I had not make serious study of its implications. I may try to look at this topic again in next week.
Wojtek _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

