Hello,
I am having a compute pipeline (physics simulation) that ends with a camera that renders to an image (for further processing on cpu). I'd like the Viewer::frame() to exit only after the image has been rendered to, so that update traversal happens after the data has been downloaded to image.
I am familiar with the workings of
Code:
setDataVariance(osg::Object::DYNAMIC),
but this unfortunately applies to drawables, not the output image. If I set data variance to dynamic, the frame() will wait to process the drawables for the camera node, but exit right after, not waiting for the render to image to finish. The only way I could figure out, to make it wait, is to set up a dummy camera (with dynamic variance) with a render order right after my image-camera. That works, but I was hoping there is nicer solution to this problem that I am missing.
I was also considering camera PostDraw callback, but it doesn't really solve the problem, since the downloaded data won't be available in the next frame update travesal.
If anyone can share some experience on this matter, I'd appreciate it. Thanks.
Cheers,
Marko
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54699#54699
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org