Uniform blocks

In order to construct a uniform block, Relinquish provides a API to query the shader about the size and content of each uniform block.

r_shader_uniform_data_set

void r_shader_uniform_data_set(RShader *shader, void *data, uint block_id);

Description: Over writes the shaders internal storage of unifoms for a block with data provided. Is potentialy significantly faster the individualy setting the values.

r_shader_uniform_matrix_set

void r_shader_uniform_matrix_set(RShader *shader, uint8 *uniform_data, uint block_id, RMatrix *matrix);

Description: If a memory block contains any of the predefined matrix uniforms, this function can automaticly sett the current uniform data state in to a user provided memory block.

r_shader_uniform_texture_pointer_get

uint64 r_shader_uniform_texture_pointer_get(uint texture_id);

Description: Allows the user to converta texture id in to a 64 bit value that can be set directly in to a memory block.