Hello everyone ! Robert, in fact I found exactly where the problem comes from:
Above my star object (so all my points in a geometry in a geode) I added an osg::Camera On this camera I have an event callback, and in this event callback I used to set the Camera viewport and graphics window to be the same as the master camera (except that: 1. I doesn't make sense with a CompositeViewer since we have 1 event traversal for possibly many View, and 2. Now I know this is pointless anyway since a sub camera will retrieve the parent camera viewport if it doesn't have its own (and I assume it's the same for the graphics context ?) ) Anyway, if I remove this event callback from that camera, everything is fine, if i keep it, I get this awfully long draw + GPU phases for at least one View when I have two of them on the same scene. Maybe you have an explanation for this ? But I just need to find a better implementation for handling those stars anyway. Manu. 2010/2/3 Robert Osfield <robert.osfi...@gmail.com> > Hi Manu, > > I haven't tried osgEarth+multi-views+multiple-contexts like you are > attempting so can't offer to much insight. In your investigation one > thing you could try is instead of creating two windows/two graphics > contexts, is to create a single window/graphics context and then have > the two views share this window using separate viewport to what > portion of the window is dedicated to each view. Using a single > graphics context will drive both the OSG and the graphics/drover card > more efficiently. > > To set the viewport just set the view's master camera to be attached > to the window, and then set master camera's viewport to the > appropriate portion. Have a look at the osgcamera example to see how. > > Robert. > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org