Re: [osg-users] Changing the value of a uniform during at scene graph traversal

2009-01-22 Thread Jean-Sébastien Guay
Hi Matthew, Now, you can't change a uniform during a single OpenGL traversal, of course (i.e., between glBegin() and glEnd()), but there is nothing stopping you from changing a uniform at any other time. If a single object is broken into several glBegin()/glEnd() sections for a given

[osg-users] Changing the value of a uniform during at scene graph traversal

2009-01-21 Thread Roger James
I want to change the value of a uniform for the traversal of a subgraph. A the moment I am not sure how to do this. Does anyone have any suggestions on the easiest way to do this? Thanks, Roger ___ osg-users mailing list

Re: [osg-users] Changing the value of a uniform during at scene graph traversal

2009-01-21 Thread Robert Osfield
Hi Roger, Do you mean you want a uniform to hold multiple values, one for each subgraph it's associated with? If so this isn't possible, if you want different values then you'll need to use multiple Uniforms, perhaps dynamically deciding which StateSet to use for each subgraph to be able to pass

Re: [osg-users] Changing the value of a uniform during at scene graph traversal

2009-01-21 Thread Roger James
Robert Osfield wrote: Hi Roger, Do you mean you want a uniform to hold multiple values, one for each subgraph it's associated with? If so this isn't possible, if you want different values then you'll need to use multiple Uniforms, perhaps dynamically deciding which StateSet to use for each

Re: [osg-users] Changing the value of a uniform during at scene graph traversal

2009-01-21 Thread Jean-Sébastien Guay
Hi Roger, I was wondered if I could do something like attaching a uniform of the same name to the stateset of that node. I must admit I could not think of an easy way of doing it! Well, you can do that! Different statesets can have uniforms of the same name, same type but different values

Re: [osg-users] Changing the value of a uniform during at scene graph traversal

2009-01-21 Thread Roger James
Jean-Sbastien Guay wrote: Hi Roger, I was wondered if I could do something like attaching a uniform of the same name to the stateset of that node. I must admit I could not think of an easy way of doing it! Well, you can do that! Different statesets can have uniforms of the