Hi Tim,

I am currently reviewing this submission and generally it looks great
and I'm now thinking about merging various parts of it.  I'm not yet
happy with all parts though, in particular the introduction of graphic
context swap callback and then use of this in osgViewer::ViewerBase
feels at overly hardwired and in the longer term inflexible and
potentially buggy if users feel they want to use the swap callback
themselves. I'd like to come up with a better solution for this part
of the feature before merging the complete functionality.

I'm happy with the addition of a swap callback to GraphicsContext, but
I'd probably look to hide the if (callback) callback else
swapImplementation within a convenience method so we can centralize
the implementation details so that GraphicsThread.cpp doesn't need to
know about specifically about callbacks.  Leave this with me to worry
about the details on this.

I would rather not see such a swap callback used for the purpose of
collecting stats.  Perhaps osg::State itself could be called by
GraphicsContext::swapBuffer or the new convenience method I allude to
above. Always invoking this call seems inappropriate so I would have
thought that a flag could be used to enable this type of stats
collection in osg::State.

Thoughts?
Robert.







On Thu, Jul 8, 2010 at 10:49 AM, Tim Moore <[email protected]> wrote:
> Hi,
> I've implemented using a timestamp, available with ARB_timer_query and
> OpenGL 3.3, to gather GPU stats. This is nice because it can accurately fix
> the GPU draw time with respect to the other times on the stats graph, rather
> than having to estimate the wall time of the end of GPU drawing. This also
> prevents anomalies like the GPU phase starting before the draw phase...
> Tim
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to