environment_generic_structure
Environment shared by all draw calls (camera, projection, light, uniforms).
Fields and methods
Members of the struct environment_generic_structure. Most of what you do with a CGP type goes through the free functions listed below.
Fields
bool default_expected_uniform = true | Static flag, true by default, used as the default value of expected in send_opengl_uniform; mesh_drawable combines it with its own flag, and false silences the warning for a uniform that the shader does not use. |
Methods
| Sends the uniform variables of the environment to the shader; does nothing in this base class and is meant to be overridden by a derived environment. src |
Functions taking a environment_generic_structure
Draw 10
Documented on another page
drawDraw a curve_drawable as a line strip or as separate segments, limited to the first N_points points if N_points is not -1.oncurve_drawabledrawDraw the N_valid_points points currently stored in a curve_drawable_dynamic_extend.oncurve_drawable_dynamic_extenddrawDraw 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 the skybox; call it first with depth writing disabled (glDepthMask(GL_FALSE)).onskybox_drawabledrawDraw the recorded positions of a trajectory_drawable as a polyline, if any.ontrajectory_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 environment_generic_structure
None.
Operators
None.