<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 23.10.2015 13:46, Robert Osfield
wrote:<br>
</div>
<blockquote
cite="mid:CAFN7Y+Xr-dguCVym93y6aUXVUqdQZ7sZ+zK3YbaNcGq=U-_NNA@mail.gmail.com"
type="cite">
<pre wrap="">Hi Robert,
On 23 October 2015 at 12:36, Robert Milharcic <a class="moz-txt-link-rfc2396E" href="mailto:robert.milharcic@ib-caddy.si"><robert.milharcic@ib-caddy.si></a>
wrote:
</pre>
<blockquote type="cite">
<pre wrap="">First of all, I didn't know that cull and draw traversal can execute in
parallel on a single scene. I always thought that cull and draw can only
execute sequential (serial) in all available threading models. Anyway,
what I know for sure is that update and draw traversal can indeed execute
in parallel within some threading models, and that is the reason why we
need DYNAMIC variance, to tell drawing thread it must process dynamic
elements first, and then immediately allow execution of the update
traversal in a main thread while STATIC elements are still being rendered
in a draw thread. I also suspect that next frame cannot start before all
the static+dynamic elements are rendered. If I'm correct on this one, then
few DYNAMIC elements should not affect frame rate at all, because there is
plenty of time to do the processing while STATIC elements are still being
rendered.
</pre>
</blockquote>
<pre wrap="">
With the DrawThreadPerContext and DrawThreadPerContextCullThreadPerCamera
threading models the static part of the rendering can be done in parallel
with the next frame. You guess this correct.
The one thing I'd add is that the OSG itself doesn't attempt to sort
DYNAMIC objects so that are drawn first. You can set up your
StateSet::RenderBinDetails to force the dynamic objects to be drawn first,
but you can only do this for objects that don't affect the rendering of
other objects, or are affected by what is the fame buffer already.
In the case of text it has to be placed in the depth sorted bin which is
drawn after the main opaque bin, so if there are text objects set to
DYNAMIC then you stop the next frame from start till the end of dispatch of
the last depth sorted dynamic object. This may well be very near the end
of the draw dispatch so you come pretty close to nullifying all the
capacity for running the draw thread in parallel with the next frames'
update and cull traversals. This is likely the situation for Sebastian.
Using double buffering of Text object's is probably the best way to avoid
updating a Text object while it's being drawn, allowing the Text
DataVariance to remain STATIC. Such double buffering could be done a
custom Node that has two Text objects, one for current frame being updated,
and one for the previous frame still being rendered.
Robert.
</pre>
</blockquote>
Hi Robert Osfield,<br>
<br>
Thank you very much for the more in-depth explanation. I pretty sure
that this additional info can benefit Sebastian and others as well<span
style="color: rgb(84, 84, 84); font-family: arial, sans-serif;
font-size: small; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: 18.2px;
orphans: auto; text-align: left; text-indent: 0px; text-transform:
none; white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline !important; float:
none; background-color: rgb(255, 255, 255);"><span
class="Apple-converted-space"></span></span> (including me).<br>
<br>
Cheers,<br>
Robert Milharcic<br>
</body>
</html>