You can share Uniforms and Programs between StateSets. There are no
problems. If you update a Uniform, the change takes affect for all places
where it is referenced.

Optionally, you could create a single StateSet that references a Program and
Uniforms, and share that StateSet in multiple places in your scene graph.
This will facilitate StateSet sharing in the cull visitor.

Whether you do the former or the latter depends on your application
requirements.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of paulo
Sent: Wednesday, March 25, 2009 2:24 PM
To: [email protected]
Subject: [osg-users] Sharing programs and uniforms among state sets

Hi,

Is it ok to share program and uniform objects among stateset objects? 

no problems when updating the same uniform for each state set?

If a state set is equal for several passes is it ok to share it among them?

Thank you.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9244#9244





_______________________________________________
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