Vizard 7 » Command Index » Vizard objects » uniform » <uniform>.set
7.7

<uniform>.set

Set the value of the uniform

<uniform>.set(  
data  
index = 0  
)  
data
The data type and size should match the type and size of the values use to create the uniform
index = 0
0-based array index for accessing values of uniform arrays.

Remarks

This command can be used to dynamically change the value of a uniform. The type and number of values of a uniform cannot be changed once it is created. The number/type of values specified should match the number/type of values used to create the uniform.

Return Value

None

Example

u = viz.addUniformFloat('color',[0,0,0])

u.set([0.5,1.0,0.0])