Hi Belhil, On 5/15/07, belthil <[EMAIL PROTECTED]> wrote:
It's the first time i'm updating OpenSceneGraph. And now i'm trying to install OpenSceneGraph-1.9.4 instead of my last version (OSG-1.2). And as it's explained in the website, osgProducer has been replaced by osgViewer. So i changed this declaration: osgProducer::Viewer viewer(arguments) to this one: osgViewer::Viewer viewer(arguments)But with this, when compiling i have lots of errors about this class. Apparently in this new class there are not the functions like "addCameraManipulator" or "sync" or "cull" or "update" and so on anymore. And it even does not like the parameter "arguments". What is the solution to resolve this problem? Are those functions in another class now? What do i have to do?
osgViewer::Viewer have their similarities in terms of functionality, but they are different classes, with different choices made about the layout and naming. Have a browse through the examples and the header to osgViewer::Viewer. Right now there is no constructor that takes an Arguments parameter. I may add this back in though. In general I've been keen the Viewer API as simple as a can keep it, and then adding to this when a function is proven to be useful and needed. addCameraManipulator(..) is replaced by setCameraManipulator(..), this substantially simplifies the API, while not removing any functionality. See the osgviewer application for an example of using multiple camera manipulators. There is no Viewer::sync() as the syncronization of graphics threads is all done in the renderingTraversals() method. Again this simplifies the code, and make the use of the viewer safer and more straightforward. update is still there, but now called updateTraversals(), there is also a new one call eventTraversals(). cull and draw are both part of the renderingTraversals() method. All the traversals are now encapsulated by the frame() method, so it calls advance(), eventTraversal(), updateTraversal() and renderingTraversals(). There is also a run() method that while does the frame loop for you, but you don't have to use it, its just there if you want to be lazy. Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
