[osg-users] Shaders with multiple views using ViewportCallback

Robert Osfield robert.osfield at gmail.com
Mon May 14 01:53:55 PDT 2018


Hi Christoph,

On 14 May 2018 at 08:58, Robert Osfield <robert.osfield at gmail.com> wrote:
> I would have thought it would work, but haven't tried this specifically myself.
>
> Older versions of the OSG didn't have support for calling update
> callbacks on view(er) Camera's.  I've just had a look at 3.2, 3.4 and
> 3.6/master and then all look to the have the code to do the update
> traversal on the view's master and slave Camera.

I added your code snippets to an example program and reproduce the bug
of the update callback not being called on the view's master Camera's
StatetSet's Uniform.  This bug exists in 3.2, 3.4, 3.6 and master!

I have fixed bug that existed for both the update and event traversals
and am currently applying this to master and 3.2, 3.4, 3.6 branches.

    https://github.com/openscenegraph/OpenSceneGraph/commit/8656ab8a3c1da12e48ac212b70f58a34996d5193

> A fall-back would be to assign an update/event callback to the Camera
> to do the update.

Without the bug fix it should be possible to use a node rather uniform
update callback on the Camera, or place the StateSet on the root of
the scene graph.

Robert.


More information about the osg-users mailing list