<div dir="ltr">Hi Sebastian,<br><div class="gmail_extra"><br><div class="gmail_quote">On 1 December 2015 at 16:12, Sebastian Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Sorry for answering my own question:<br>
<br>
The reason- of course- is threading. When setting the threading
model to single-threaded the correct matrix is used in the frame.<br></div></div></blockquote><div><br></div><div>I just had a look at the code, you don't set the DataVariance of the osg::Geometry to DYNAMIC so when the viewer runs multi-threaded the vertex update code can update the geometry whilst the previous frame is still being rendered. So rather than the camera lagging the geometry by a frame, it's the geometry actually jumping ahead of the camera.<br><br></div><div>It's a subtle little bug but quite a good class example of the challenges of trying debug multi-threaded applications :-)<br></div><div><br></div><div>Robert.<br></div><div><br> </div></div></div></div>