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.r_shader_state_set_stencil
void r_shader_state_set_stencil(RShader *shader, boolean front, RStencilFunc function, uint32 reference, uint32 mask, RStencilOp stencil_fail_op, RStencilOp depth_fail_op, RStencilOp sucsess_op);
Description: Controms the shaders chanel mask where the rendering of individual components can be turned on and off.Types:
Enum:
RStencilFunc
R_SF_NEVER |
R_SF_ALWAYS |
R_SF_LESS |
R_SF_LESS_OR_EQUAL |
R_SF_GREATER |
R_SF_GREATER_OR_EQUAL |
R_SF_EQUAL |
R_SF_NOT_EQUAL |
R_SF_COUNT |
Enum:
RStencilOp
R_SO_KEEP |
R_SO_INVERT |
R_SO_ZERO |
R_SO_REPLACE |
R_SO_INCR |
R_SO_INCR_WRAP |
R_SO_DECR |
R_SO_DECR_WRAP |