Expand description
Different types of buffers used for sending data (primarily geometry data) to the GPU.
Structs§
- A buffer containing 3 indices for each triangle to be rendered, which is why it is also known as an index buffer. The three indices refer to three places in a set of VertexBuffer where the data (position, normal etc.) is found for the three vertices of the triangle. See for example Program::draw_elements to use this for drawing.
- A buffer containing per instance data. To send this data to a shader, use the Program::use_instance_attribute method.
- A buffer for transferring a set of uniform variables to the shader program (see also use_uniform_block).
- A buffer containing per vertex data, for example positions, normals, uv coordinates or colors. To send this data to a shader, use the Program::use_vertex_attribute method.
Traits§
- The basic data type used for each element in a VertexBuffer or InstanceBuffer.
- The basic data type used for each index in an element buffer.