[osg-users] animation in SceneView vs. Viewer??
Robert Osfield
robert.osfield at gmail.com
Thu Aug 30 02:41:50 PDT 2007
Hi Abe,
I don't know what might be up given your code fragment. SceneView is
lower level that osgViewer::Viewer, so does require more care with
setup, and its less powerful....
Personally I wouldn't recommend using SceneView in your own code, just
use osgViewer::Viewer and its embedded mode if you need to integrate
with an existing window. It's a waste of our time to struggle on
trying to get SceneView do things that Viewer already does out of the
box perfectly.
Robert.
On 8/30/07, Abe Stephens <abe at sci.utah.edu> wrote:
> Hi, I'm attempting to load an animated .osg scene exported from blender
> into an existing application with minimal fuss. The existing application
> has a basic glut front end and a more useful wxpython front end. I'm
> having trouble getting animation to work properly:
>
> In the glut application using osgViewer::Viewer animation works when
> I call:
>
> viewer->advance()
> viewer->updateTraversal()
> viewer->renderingTraversal()
>
> However in the wxpython application, using osgUtil::SceneView animation
> does not work. I am calling:
>
> frameStamp = osg.FrameStamp()
> time =
> osg.Timer.instance().delta_s(self.start_tick,osg.Timer.instance
> ().tick())
> frameStamp.setReferenceTime(time)
> frameStamp.setSimulationTime(time)
> frameStamp.setFrameNumber(self.framecounter)
> self.framecounter += 1
>
> self.sceneviewer.setFrameStamp( frameStamp )
> self.sceneviewer.update()
> self.sceneviewer.cull()
> self.sceneviewer.draw()
>
> I noticed that unlike osgViewer::Viewer, SceneView::update() does not
> appear to apply the update visitor to the scene data, only to the
> camera.
>
> Any idea what I am doing wrong?
>
> Thanks-
> Abe
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
More information about the osg-users
mailing list