[osg-users] measuring a frame

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Mon Nov 6 06:52:50 PST 2017


thanks Robert ! I am seeing there is an example too for the user stats.
Sometimes I am faster by shooting even sample questions to the user list
before doing the home work

Thanks again !

Nick

On Mon, Nov 6, 2017 at 9:37 AM, Robert Osfield <robert.osfield at gmail.com>
wrote:

> Hi Nick,
>
> On 6 November 2017 at 00:56, Trajce Nikolov NICK
> <trajce.nikolov.nick at gmail.com> wrote:
> > I am trying to measure the time needed to process a frame. My first and
> > somewhat naïve approach is to init the timer at the beginning of the
> frame
> > and get the result after the renderingTraversal. But, it seams (and that
> is
> > what I believe it is happening) the rendering traversal is containing the
> > swap buffers which is synced with the refresh rate (please correct me if
> I
> > am wrong). Is there something like preswap callback or something like
> this?
>
> Are you aware of the osg::Stats data structure and support built into
> osgViewer?  The StatsHandler.cpp that provides the on-screen stats
> enables stats collection and then gets the stats from the osg::Stats
> objects.  Various parts of the OSG check for the osg::Stats objects
> and then fill in the details when required.  The osg::Stats objects
> are designed to queried by users.  Just have a look at how
> src/osgViewer/StatsHandler.cpp sets things up.
>
> Robert
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20171106/9871423a/attachment-0001.html>


More information about the osg-users mailing list