Re: [osg-users] How can I get last frame time inn order to create indepent FPS aniamtions?

2009-11-24 Thread Ricardo Ruiz
Good idea, as expected, it works perfectly. But I'm curious, do you know why old my approach does not work? (calculate frame time, is it because of threads?) Thanks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20234#20234 _

Re: [osg-users] How can I get last frame time inn order to create indepent FPS aniamtions?

2009-11-23 Thread Rafa Gaitan
Hi Ricardo, On Mon, Nov 23, 2009 at 3:58 PM, Ricardo Ruiz wrote: > Thanks Rafa, but it does not work. Try something like this: Code:        double angle=0;        while (!viewer.done()) {                angle=viewer.getFrameStamp()->getReferenceTime(); viewer.getCamera()->setViewMatrixAsLo

Re: [osg-users] How can I get last frame time inn order to create indepent FPS aniamtions?

2009-11-23 Thread Ricardo Ruiz
Thanks Rafa, but it does not work. Code: double angle=0; float delta=1; while (!viewer.done()) { float start=viewer.getFrameStamp()->getReferenceTime(); angle=angle+0.05*delta; viewer.getCamera()->setViewMatrixAsLookAt(osg

Re: [osg-users] How can I get last frame time inn order to create indepent FPS aniamtions?

2009-11-22 Thread Rafa Gaitan
Hi Ricardo, Why don't try reference time? viewer.getFrameStamp()->getReferenceTime(); Rafa. On Mon, Nov 23, 2009 at 1:29 AM, Ricardo Ruiz wrote: > Hi all. > > How can I get last frame time inn order to create indepent FPS aniamtions? > > For instance, something like m_last_time_frame: > > > >

[osg-users] How can I get last frame time inn order to create indepent FPS aniamtions?

2009-11-22 Thread Ricardo Ruiz
Hi all. How can I get last frame time inn order to create indepent FPS aniamtions? For instance, something like m_last_time_frame: Code: double angle=0; while (!viewer.done()) { angle=angle+0.1*m_last_time_frame; viewer.getCamera()->setViewMatr