Hi Karl,

On Dec 11, 2007 10:33 PM, Karl Heijdenberg
<[EMAIL PROTECTED]> wrote:
> About the FrameStamp class:
> The frameTime is the efficient time that the frame elapsed (except from
> swapBuffers).

FrameStamp is not meant for recording stats such as relative times
between subsequent frames, its meant to record an absolute time stamp
so that the various traversals can set there animations etc from it in
a single consistent for all traversals for that frame.  The Stats
class is for recording stats.

It seems to me like it you spotted a few convenient places to add
variables w.r.t the purpose of adding more on screen stats, this might
have made doing the stats work more straight forward but it breaks the
clear lines of functionality that classes are intended to support, if
one follows this route you can quickly end up with a quagmire.

> I have also review my code in the GraphicsContext and you should just need
> one Timer there. It could be called _elapsedFrameTime and be
> started/restarted right after swapBuffers. Instead of doing the delta_s()
> calculation between two timers it is much more appropriate to the get the
> elapsed time from the _elapsedFrameTime->time_s() method. The same change
> applies of course also to the GraphicsThread class. Sorry that I didn't saw
> that earlier.

I don't feel its appropriate to have stats collection in the
GraphicsContext class, its more appropriate to have it in the code
that calls it.

Could you explain why the "frame rate" and "frame duration" stats
collected in the Viewer::advance() method are insufficient for the
purpose?   I'm open to additions/refinements but I need to know the
motivation behind changes to judge if appropriate.

> > One area that isn't controversial is moving the
> > setFrameStamp/getFramStamp from osgViewer::View to osg::View, this is
> > reasonable and non intrusive so I've gone ahead and merged this
> > change.
> >
>
> Cool, will I enter the list of contributors for that tiny little change!?
> :-)

Yes, next time I generate the ChangeLog and updated AUTHORS.txt via
the osgversion automated support for extracting contributors your name
will there ;-)

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to