Hi Joel,

The update traversal is run before all the cull and draw traversals so
one can't have an update happening between a RTT Camera and the main
Camera.  If one is using DrawThreadPerContext or
CullThreadPerCameraDrawThreadPerContext threading models then it is
possible for the viewer to allow the next frame to commence once all
the dynamic StateSet+Drawable are dispatched, but this will just
overlap the non changing leaves of the scene graph.  Internal nodes of
the scene graph don't effect the state of the draw draw that is
running so these can be changed without requiring one to explicitly
set the DataVariance on them to DYNAMIC.

Given this I would suggest looking into your own application on how
you manage the view matrix for the main and RTT camera as this must be
getting out of sync.  Perhaps you are copying the view matrix in
update, but as the master's camera view matrix is copied from the
CameraManipulator at the end of Viewer::update() after the visitor
have run perhaps this is the cause.  You are free to implement your
own update operation, or setting your RTT Camera's after the update
traversal so you can easily customize the behaviour to be appropriate
for your application.

Robert.

On 7 June 2012 03:25, Joel Graff <[email protected]> wrote:
> Hi,
>
> I've run into a problem that seems to be a pretty obvious issue of the draw 
> traversal exiting early, but the usual solution of calling setDataVariance ( 
> DYNAMIC ) isn't working.
>
> I'm using an RTT camera to apply a shader effect to some geometry, then a 
> texture shader in the main camera's graph to apply the texture directly to 
> the geometry itself (that is, I'm not using a full-screen quad to render the 
> final output, only the actual geometry).
>
> The problem I'm encountering is that somewhere between the pre-render and the 
> final render of the scene, the geometry vertices get transformed.  That is, 
> if I start the camera spinning using the trackball manipulator, the 
> orientation of the geometry in the RTT output is a frame behind the 
> orientation in the main camera view.  This suggests that an update is 
> occurring between the pre-render and final render of the scene.
>
> Anyway, I'm not sure where the problem lies.  I've set my geometry and 
> corresponding statesets to dynamic data variance, with no luck.  I've even 
> tried running the viewer in single threaded mode.  Attached is a picture of 
> the problem I'm encountering.  When the camera is not rotating, everything 
> looks perfect.
>
> Any thoughts?
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=48092#48092
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to