Module three_d::core::buffer[][src]

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. Can send between 1 and 4 values of InstanceBufferDataType to a shader program for each instance. To send this data to a shader, use the Program::use_attribute_instanced, Program::use_attribute_vec2_instanced, etc. functionality.

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. Can send between 1 and 4 values of InstanceBufferDataType to a shader program for each vertex. Bind this using the Program::use_attribute, Program::use_attribute_vec2, etc. functionality.

Traits

The basic data type used for each index in an element buffer.

The basic data type used for each element in a InstanceBuffer.

The basic data type used for each element in a VertexBuffer.