Hi Shuiying,

osgViewer is written to natively support multi-context multi-threaded
viewers, however for you needs it may well made not be the best route.
 For render to texture work the result is required for the main camera
so will have to be done before the main camera so would necessarily be
single threaded at this point - even you ran it with multiple threads
you'd need to use a barrier to make sure the result is read for the
main camera.  Also one would need to copy the data from the the render
to texture contexts graphics card to main memory then have this copied
back to the main cameras graphics card which will be far far slower
than having data local to the main camera.

If you could run the render to texture cameras one frame ahead of the
main camera you could improve the parallelism but you'd still have the
data copy cost.

Robert.

On 5 April 2012 15:23, wang shuiying <[email protected]> wrote:
> Hello,
>
> In my application, there are several pre-render cameras and a main camera.
> In order not to slow down the frame rate for the main camera, I would like
> to try to move the pre-render cameras out of the graphics context of the
> main camera, and into another graphics context. The view node for all
> cameras to render is changing all the time. So I wonder whether cameras in
> different graphics contexts(i.e. different GPUs)  can render a changing view
> node in a multi-thread (or, multi-grahics) way, while the updates of the
> view node happens only in the main camera context?
>
>
> Thank you very much for any advice in advance!
>
> Shuiying
> _______________________________________________
> 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