Hi,
> If you have just a single uniform value per context then I'd simply place the > Uniform on the each if the viiewer's osg::Camera's StateSet, such that each > Camera assigned to each Context gets it's own state inherited down including > the Uniform. > Some nodes have a cull callback. During the cull traversal, the callback > identify the current view/context > and push the corresponding state set in the render graph, traverse the > children and pop the state set. I have exactly the same needs, and I use the same solutions ! - Some of my "per-view" uniforms are "static" : their value never change => those are added on viewer's camera's stateset - Some of my "per-view" uniforms are "dynamic" : their value change at each frame (based on camera position, user settings, a specific object position...) => those are pushed at cull traversal : the view is identified from the cullvisitor, specific value computation is done there and the uniform is pushed. Cheers, Aurelien ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56954#56954 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

