![]() |
![]()
| ![]() |
![]()
NAMEshader_uniform - Set values for a uniform values in a specific shader. SYNOPSISnil
DESCRIPTIONA shader can have a number of uniform variables declared. The specific values of such a uniform can be set through this function. shid is a reference to a shader allocated through build_shader. symlbl is the identifier of the uniform and typestr is a string that specifies the actual type of the uniform. Accepted patterns for typestr include "b" (bool), "i" (int) "f" (float), "ff" (vec2), "fff" (vec3), "ffff" (vec4), f*16 (mat4). It is also possible for one shaderid to maintain different sets of uniform values. Each group is tied to the life-cycle of the program and is allocated with shader_ugroup . The id that is returned can then be used in image_shader to specify which subgroup that is to be used. NOTES
EXAMPLEfunction shader_uniform0() SEE ALSO:shader_ugroup(3) image_shader(3) build_shader(3)
|