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 rend

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

2009-01-22 Thread Matthew Fuesz
J-S wrote: > > I (and probably Robert too) thought you wanted to change the value of a > Uniform in mid-traversal... > While it is true that one cannot affect the values of uniforms during a rendering pass in the default OSG implementation, there is nothing preventing one from changing the

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

2009-01-21 Thread Roger James
Jean-Sébastien 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 s

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 a

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 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 i

[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 osg-users@lists.opensceneg