uniform_generic_structure
Named uniform values (int, float, vec3, mat4...) sent to every shader.
Fields and methods
Members of the struct uniform_generic_structure. Most of what you do with a CGP type goes through the free functions listed below.
Fields
std::map<std::string,int> uniform_int | Integer uniforms to send, keyed by uniform name. |
std::map<std::string,float> uniform_float | Float uniforms to send, keyed by uniform name. |
std::map<std::string,vec2> uniform_vec2 | vec2 uniforms to send, keyed by uniform name. |
std::map<std::string,vec3> uniform_vec3 | vec3 uniforms to send, keyed by uniform name. |
std::map<std::string,vec4> uniform_vec4 | vec4 uniforms to send, keyed by uniform name. |
std::map<std::string,mat2> uniform_mat2 | mat2 uniforms to send, keyed by uniform name. |
std::map<std::string,mat3> uniform_mat3 | mat3 uniforms to send, keyed by uniform name. |
std::map<std::string,mat4> uniform_mat4 | mat4 uniforms to send, keyed by uniform name. |
Methods
| Sends every stored uniform to the shader, which must be in use, warning for a name absent from the shader when expected is true. src |
Functions taking a uniform_generic_structure
Draw 6
Documented on another page
drawDraw every node of the hierarchy with draw(mesh_drawable); call update_local_to_global_coordinates() beforehand.onhierarchy_mesh_drawabledrawDraw a mesh_drawable with its shader, textures, model and material, plus the environment and optional additional uniforms, possibly instanced or with an overriding material.onmesh_drawabledrawDraw a non-indexed triangles_drawable (triangle soup) with its shader, texture, model and material, plus the environment and optional additional uniforms.ontriangles_drawabledraw_wireframeDraw the triangle edges of every node of the hierarchy in a flat color (no effect with Emscripten/WebGL).onhierarchy_mesh_drawabledraw_wireframeDraw the triangle edges of a mesh_drawable in a flat color, slightly offset toward the camera (no effect with Emscripten/WebGL).onmesh_drawabledraw_wireframeDraw the triangle edges of a triangles_drawable in a flat color, slightly offset toward the camera (no effect with Emscripten/WebGL).ontriangles_drawable
Functions returning a uniform_generic_structure
None.
Operators
None.