If it changing per primitive, then you are supposed to use uniform variable… they change per primitive too.
However if you are thinking about glVertexAttrib, a nVidia paper about speudo instancing give the advice to use this glVertexAttrib instead of glUniform. A reason could be because internally the drivers could relink the program when you change an uniform variable…
I have test actually so the best would be to have a look on the efficiency. This could have change with GeForce 8 anyway…
The issue is that the number of varying variable is quite limited comparying (64 float on GF8?) to uniform variable. (4096 float on GF8?)
In my travels looking at some examples for clarification of ideas I have seen a lot of people sending identical Attrib data per vertex in immediate mode…
Obviously this becomes moot if you are using buffers but when I do it I seem to get away with just leaving the last data there for as long as it’s state does not change.
This is within a primitive, or groups of primitives…
But in any case my understanding is that as long as that attribute binding is in place the data should remain fixed.
Am I understanding this correctly, or getting away with something that is not guaranteed.