hi robert,
i guess that you remember my questions about the SceneView access. I did a
review of the Scene and Viewer design also with the implementation part. i
wonder why you
create for each setSceneData a new Scene. I understand that you like to have
multiple scenes in the OSG Viewer with multiple Windows. And then you call
assign to camers.
I am not sure that this is a good desicions. If i would like to have more
than one scene in many windows, i would like to have one scene and multi
windows and also
scene S in n windows and scene K in m windows (cameras). But the actual
design doesn't not yet support this, i am right? (have a look at the code
snip)
Scene::Scene():
_firstFrame(true)
{
_frameStamp = new osg::FrameStamp;
_frameStamp->setFrameNumber(0);
_frameStamp->setReferenceTime(0);
_updateVisitor = new osgUtil::UpdateVisitor;
_updateVisitor->setFrameStamp(_frameStamp.get());
setDatabasePager(new osgDB::DatabasePager);
}
void Viewer::setSceneData(osg::Node* node)
{
_scene = new osgViewer::Scene;
_scene->setSceneData(node);
_scene->setFrameStamp(_frameStamp.get());
computeActiveCoordinateSystemNodePath();
setReferenceTime(0.0);
assignSceneDataToCameras();
setUpRenderingSupport();
}
Better would be to have a Viewer with multi window / camera support, each of
them are synchronised, only if we have shared memory or shared resource. the
easiest way is to
have syn. technique for each configuration. We can render (draw) in
parallel, update the scene protected as you much better know than me.
I propose for design to have
+ ViewerManager
- Viewer (A)
* Scene
o SceneView
o Camera
- Viewer (B)
* Scene
o Camera
o SceneView
I feel like to have the maximun of flexiblity for our new generation of
viewer. Or what did you still have for design?
What think others about this really important topic for the future of our
application.
regards
adegli
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/