Hello Everybody, I have one scene camera for rendering the scene. I've attached a slave camera for rendering the scene to 3 depth textures (I need 3 specific viewpoint renderings to depth). I'm trying to figure out the best way to approach this.
My first thought is to use the RenderBin draw callback for the slave camera. In this callback, I would attach my depth texture to the fbo and render the first pass from one viewpoint. I then would attach the second depth texture to the fbo and render the second pass from a second viewpoint, and so on... I would then render that particular scene from that viewpoint by calling bin->drawImplementation() directly in my draw callback after I set the view matrix for that one viewpoint and have set the attachment (depth texture) to the fbo. So for the draw callback, there will be 3 calls to bin->drawImplementation(). It's more efficient to swap out attachments to an FBO than to switch between FBOs. So I don't want to have a separate slave camera for each pass. I also don't want the extra overhead of using 3 cameras when I can use one. Since these separate depth renderings only occur when the object is in view during the normal scene rendering, I don't need to do any extra culling. Is this the right way to approach this? If so, how do you get the RenderBin to set the DrawCallback? None of the examples show this, which makes me believe it may be the wrong approach. Thanks for any input! ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52827#52827 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

