[osg-users] Rendering performance issues

Robert Osfield robert.osfield at gmail.com
Tue Jul 8 10:10:17 PDT 2008


Hi Todd,

On Tue, Jul 8, 2008 at 6:03 PM, Todd J. Furlong <todd at inv3rsion.com> wrote:
> Not sure if this is related, but...
>
> When timing an OpenGL application, we always make sure to do a glFinish()
> before recording the time at the end of a draw.  The glFinish waits for the
> OpenGL commands in the pipeline to complete before returning and gives a
> truer measurement of the time.  Without waiting, draw timing tends to be
> reported as higher than it really is until the FIFO buffer gets filled.

This is typically true for trying to time OpenGL, but when you have
the OpenGL timing stats extension supported you can put timing markers
directly into the fifo and get back actual elapsed time between points
for what is happening down on the GPU.  This extension means you can
get a clear picture of what's happening on the GPU without needing to
flush/finish.  osgViewer supports this extension, and the stats that
this thread are covering have these GPU stats in place.

Robert.



More information about the osg-users mailing list