Shader state

Each shader also stores fiuxed function state that is automaticaly set when a shader is bound.

r_shader_state_set_depth_test

void r_shader_state_set_depth_test(RShader *shader, uint depth_test);

Description: Sets the shaders depth opperation.

r_shader_state_set_cull_face

void r_shader_state_set_cull_face(RShader *shader, uint cull_face);

Description: Sets the shader back face cullingh state.

r_shader_state_set_blend_mode

void r_shader_state_set_blend_mode(RShader *shader, uint blend_source, uint blend_destination);

Description: Controls the shaders source and destinating blend factor.

r_shader_state_set_offset

void r_shader_state_set_offset(RShader *shader, float offset_factor, float offset_units);

Description: setts the depth offset_factor and units for multipas rendring.

r_shader_state_set_alpha_to_coverage

void r_shader_state_set_alpha_to_coverage(RShader *shader, boolean alpha_to_coverage);

Description: Enabeles of disables Alpha to coverage (not valable on all hardware).

r_shader_state_set_mask

void r_shader_state_set_mask(RShader *shader, boolean red, boolean green, boolean blue, boolean alpha, boolean depth);

Description: Controms the shaders chanel mask where the rendering of individual components can be turned on and off.