Hi Philip -- I've been working with John on this. The FrameStamp's reference
time should be clock time / elapsed seconds.
Just to clarify, the code uses reference time only to control when to flip from
one child to another, and that appears to be working correctly. John's
performance drop also occurs when other mechanisms (such as Sequence nodes) are
used to flip between children.
As an additional data point, we have evidence to suggest the issue is
platform-specific. We've seen it on some Linux systems with Quadro graphics, but
the same code has a consistent framerate on Win7 systems with GeForce graphics.
We were hoping the community would try the code and see if they are able to
reproduce framerates that vary based on the child flip time.
-Paul
On 5/7/2012 5:16 PM, Philip Taylor wrote:
I am not familiar with getReferenceTime but I think the root cause of your
problem is probably the line:
unsigned int intTime( nv->getFrameStamp()->getReferenceTime() /
_deltaFlipTime );
You probably just need to check that it is producing the values you are
expecting for 0.05 and 1.0
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of John Kelso
Sent: 07 May 2012 22:24
To: [email protected]
Subject: [osg-users] framerate drops drastically when turning child nodes on
and off
Hi all,
We are creating a simple flipbook animation. There's a node at the top, and
after a certain delta time the child node that's on is turned off, and the
next child is turned on.
If all the child nodes are turned on we get a nice solid 60 FPS. Spin it
around, move it here and there, no change in FPS. So the prolem isn't just
too much data to fit on the card.
When we animate with a delta time of .05 seconds we also get a nice smooth
animation at 60 FPS.
But, here's where things get weird, if we use a delta time of 1 second we
get a sudden and very drastic drop in frame rate. The size of the drop seems
to be related to the amount of data getting turned on and off. Same thing if
you manually single step the animation.
<SNIP>
_______________________________________________
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