Hi Jannik,

I have done a quick review but will need to come back to this after
the OSG-3.3.8 dev release as I'll need to think about the topic more
deeply and do a good deal of testing to make sure we don't see any
regressions.

Cheers,
Robert.

On 10 June 2015 at 00:37, Jannik Heller <[email protected]> wrote:
> Hi Robert,
>
> I have a sizable performance improvement for the "multiple cameras, one draw 
> thread" use case.
>
> To see the improvement, you need a scene with no dynamic Drawables or 
> StateSets, and a Viewer with at least two slave Cameras using the same draw 
> thread.
>
> The change concerns the firing of the _dynamicObjectRenderingCompleted 
> callback. The callback needs to be fired for each camera before the next 
> frame can commence. Previously, the callback was fired when Renderer::draw 
> begins. Since cameras on the same graphics context can only draw one after 
> another, this effectively means we can commence frame as soon as the last 
> camera started drawing.
>
> If we change the callback to fire in Renderer::cull instead, we can commence 
> the next frame as soon as all cameras have finished culling, which is 
> obviously *before* the last camera starts drawing, so should be a 
> non-controversial improvement.
>
> I have also attached a change to the example osgsidebyside.cpp you can use to 
> see the improvement in action. Launch it with:
> ./osgsidebyside cessna.osg
>
> My results were:
>
> DrawThreadPerContext, before change: 96 FPS
> DrawThreadPerContext, after change: 102 FPS
>
> CullThreadPerCameraDrawThreadPerContext, before change: 95 FPS
> CullThreadPerCameraDrawThreadPerContext, after change: 128 FPS
>
>
> Lastly, I noticed that Renderer::cull_draw does *not* call the 
> _dynamicObjectRenderingCompleted when there are 0 dynamic objects (as opposed 
> to Renderer::draw which *does* call it). Is this a bug?
>
> Thank you!
>
> Cheers,
> Jannik
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=64021#64021
>
>
>
>
> _______________________________________________
> 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