Hi Bob, I'm not familiar with the MFC so can't comment on threading issues that I know nothing about. I don't use Windows at all so can't answer specific, the best I can do is roughly point you in the direction that I think might be appropriate. Others in the community will have to help out with Windows specifics.
As for camera animations, the is a camera manipulator issue, you could either have your own custom camera manipulator or just set the camera's view matrix yourself. As osgPPU, we'll you need to start another thread for another topic. Robert. On Mon, Apr 6, 2009 at 8:51 PM, Bob Youmans <[email protected]> wrote: > Thanks for the very helpful guidance you provide… > > > > In the MFC example, I think the .run() method is already replaced by this: > > > > * *//viewer->run(); > > * *while(!viewer->done()) > > * {* > > * osg->PreFrameUpdate();* > > * viewer->frame();* > > * osg->PostFrameUpdate();* > > } > > I understand your suggestion about the details in the frame() call. Here’s > more detail about my intended use: > > > > For example, I want the user to be able to spin the model and look at it, > but then click a start button and then (ignoring the user inputs) > systematically traverse an axis between some values, and/or viewing angles, > and then when finished, let the user look at it again (with the rendering > details changed (color transparency, other textures, etc.). > > > > I was thinking I could stop the normal viewer threading that responds to > user input and then drive it myself from another function.When finished I > would restart the viewer to respond to user input. There’s probably a > better way… > > > > Would I be better off using update traversals, animation stuff, or some > other osg design I haven’t learned yet? > > > > How about osgPPU? What do you think of it? > > > > Thanks, > > bob > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Robert Osfield > *Sent:* Monday, April 06, 2009 2:37 PM > *To:* OpenSceneGraph Users > *Subject:* Re: [osg-users] start/stop viewer > > > > Hi Bob, > > The viewer only renders a frame when you call viewer.frame(). If you are > calling the convenience function viewer.run() then just replace this run > call with the constuent parts of Viewer::run() i.e. > > while(!viewer.done()) > { > viewer.advance(); > viewer.eventTraversal(); > viewer.updateTraversal(); > viewer.renderingTraversals(); > } > > Robert. > > On Mon, Apr 6, 2009 at 6:56 PM, Bob Youmans <[email protected]> wrote: > > Hello osg-list, > > > > I’d like to find the best way to adapt osg::viewer to control its > rendering: in one case I want the usual case where viewer->run is doing its > thing at 60 fps. But, then, I have other GUI windows (MFC-based) and I want > to stop the viewer, and then render a single frame, all using the same > geometry. What’s the best approach for such a design? Can I (using the > examples for MFC) call viewer->stopThreads and then “manually” render a > single frame, and then call run, startThreads, etc. subsequently, and > repeat this as often as I like? > > > > Thanks, > > Bob > > > _______________________________________________ > 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 > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

