Thanks for the clarification.
I didn't clue in that the OverrideValue can be set at addition time,
or that (from looking in the code) when re-adding the same uniform,
it's only the OverrideValue that is changed:
void StateSet::addUniform(Uniform* uniform,
StateAttribute::OverrideValue value)
This makes writing more generic shaders much easier to handle, using
StateSet management to control the parameters.
--------------------------
Radu Mihai
[EMAIL PROTECTED]
On 16-Dec-06, at 3:29 AM, Robert Osfield wrote:
Hi Radu,
On 12/15/06, Radu Mihai <[EMAIL PROTECTED]> wrote:
What I'd like to have clear in my head now is how is the above
different
from SS->setMode(OVERRIDE) or (PROTECTED).
By default modes, attributes and uniforms lower down in the scene
graph all override the ones from above except where the ones in the
parental path use OVERRIDE in which case the parental settings
override the lower ones.
Now if you don't wish for you local modes/uniforms/attributes to be
overridden from above then you use PROTECTED to protect them from
being overridden from above.
Both OVERRIDE and PROTECTED are bit masks that you pass in along with
the actual setting itself, in the case of modes you'll OR it with the
ON/OFF setting.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/