Hi, I have a question concerning buffers in OSG.
In OpenGL I can define a clearColor then set the buffer by calling glDrawBuffer() and finally call glClear() to make it happen. Unfortunately I could not find out so far how to do this in OSG. I recognized that I can set the clearColor in the osg::camera class, but how is glClear() performed then and how can I define different clearColors for different buffers? Also I would like to switch buffers each rendering pass, so that for example when I write gl_FragData[0] in a shader, in the first pass I want buffer1 to be gl_FragData[0] and buffer2 to be gl_FragData[1]. In the following pass I want to switch buffers, so buffer2 becomes gl_FragData[0] and vice versa. Do I need a callback function to realize this in OSG? (maybe using setPostDrawCallback()) Thank you! Cheers, Gottfried ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23838#23838 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

