Hi Mo, You wouldn't need to use two viewers, just one osgViewer::CompositeViewer with two Views. See the osgcompositeviewer for examples of how to set things up.
When doing render to texture you generally want to keep everything on the graphics card with no round trips to the main memory, so if you want to use the result of one render to texture pass in some later rendering then it's best to do that from the same graphics context, which in essence means the same graphics window. osgcompositeviewer supports multiple views sharing the same graphics context so this will be fine. You can also use a osgViewer::Viewer with multiple slave Camera to achieve the same result as using CompositeViewer and multiple Views, but if you have conceptually separate views that have independent controls then CompositeView will be more appropriate. If you have a simple debug render you want to do ontop of the main window then using a slave can be the most convenient, the osghud example provides code that does this, using a camera in the scene graph or in the slave camera in the viewer, as well as a path that composite viewer. Robert. On Mon, Aug 30, 2010 at 12:08 PM, Mo Flanders <[email protected]> wrote: > Hi, > > i'm using FBOs in osg, everything works fine. I can visualize the color > buffer i rendered to OR i can visualize the render buffer. Is it possible to > use two instances of the viewer one for visualize the color buffer AND the > other should render the render buffer of the same scene? > > Please tell me if I made an error in reasoning :O. Perhaps there is another > way to do this... Any hint? > ... > > Thank you! > > Cheers, > Mo > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=31150#31150 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

