This mail is some kind of follow-up to Anders Backman's MRT thread http://openscenegraph.org/archiver/osg-users/2006-February/0502.html
and my own about FBOs http://openscenegraph.org/archiver/osg-users/2006-September/0694.html About the workaround in osgUtil::RenderStage::runCameraSetUp which makes sure that no depth attachment is created without a color attachment and vice versa: without these lines, creating a RTT-CameraNode without a depth attachment still works on my GF6600GT/WXPSP2. Creating a RTT-CameraNode without a color attachment, i.e. when rendering a depth map, does not work using OSG. It would work in a "raw-OpenGL" environment, though. The reason is mentioned in the first thread above: "Also, for e.g. shadow maps, you can have a depth renderbuffer attachment with no color attachment, but you need to use glDrawBuffer(GL_NONE)." This is not possible with OSG, because in osg::CameraNode::setDrawBuffer "a buffer value of GL_NONE is used to specify that the rendering back-end should choose the most appropriate buffer" and is never set. Furthermore, the straightforward solution to the MRT problem as posted by Anders does not work with my code. Replacing "glDrawBuffer" with "glDrawBuffers" still works (with a single render target), but produces a flood of warnings on the console. Expanding it to two render targets does not work. At least not with my setup. That brings me to the conclusion that adding clean and working support for MRT is quite an effort including substantial changes to the current code base. Unfortunately, this needs both a lot of time and insight into the internals of the OSG. Much as I would have contributed, I don't have any of those. Regards, Marco _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
