CF_Material¶
Category: graphics
GitHub: cute_graphics.h
An opaque handle representing a material.
Remarks¶
Materials store inputs to shaders. They hold uniforms and textures. Uniforms are like global variables inside of a shader stage (either the vertex or fragment shaders). For efficiency, all uniforms are packed into a "uniform buffer", a contiguous chunk of memory on the GPU. We must specify which uniform buffer each uniform belongs to.
Related Pages¶
CF_Texture
CF_Canvas
cf_apply_shader
CF_Shader
cf_make_material
cf_destroy_material
cf_material_set_render_state
cf_material_set_texture_vs
cf_material_set_texture_fs
cf_material_set_uniform_vs
cf_material_set_uniform_fs