[osg-users] Camera render order and Threading models

Riccardo Corsi riccardo.corsi at kairos3d.it
Thu Jan 7 05:15:00 PST 2021


Hi all,

I'm facing an issue when using multiple cameras and different threading
models.
In my scene I have a slave camera which renders to a texture (using FBO +
texture attachment) in PRE_RENDER order; the texture is then attached to a
geometry which in turns is rendered by the main viewer camera.
I have verified that both cameras' view matrices are updated consistently
during the same frame update traversal (as they are linked one another).

When I run this setup with SingleThreaded model, everything works as
expected.

If I run it with DrawThreadPerContext (default on Windows), there is a
one-frame delay of the RTT camera result, meaning that during frame N the
main camera sees the render result of frame N-1 in the FBO camera texture
attachment.

I don't think this is an expected behavior.
Is there a way to fix the issue without switching to SingleThreaded mode?

Thank you,
Riccardo

-- 
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/CAHhSftjmptB8SwzDj32QE4Ex1ZoxXahKxzREcCpWw7O5MO6C5A%40mail.gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20210107/1844358f/attachment.html>


More information about the osg-users mailing list