![]() |
![]()
| ![]() |
![]()
NAMEshader_ugroup - Allocate a uniform group inside a shader SYNOPSISout_shid or nil
DESCRIPTIONAll shaders have a default group of shaders that the shader_uniform function applies to. In many cases, however, one might want to have multiple objects that uses the same shader but with a slightly different set of uniforms. shader_ugroup can be used to create a derivative shader that uses most of the same underlying resources but switches to a different set of uniforms when activated. The returned shader is valid for all shader related calls but has its lifecycle to the shader it was derived from. Any forced uniform at the time of group creation will be copied from the group associated with the specified shid. There's a finite amount of uniform group slots available to each shader, and if the provided shid is invalid or there are not enough free group slots left in the shader, the out_shid will be nil. NOTES
EXAMPLEfunction shader_ugroup0() SEE ALSO:build_shader(3) delete_shader(3)
|