[osg-users] Sharing programs and uniforms among state sets

Paul Martz pmartz at skew-matrix.com
Wed Mar 25 14:10:06 PDT 2009


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: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of paulo
Sent: Wednesday, March 25, 2009 2:24 PM
To: osg-users at lists.openscenegraph.org
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
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




More information about the osg-users mailing list