Skip to main content

BufferUsage

Type Alias BufferUsage 

Source
pub type BufferUsage = RTCBufferType;
Expand description

Defines the type of slots to assign data buffers to.

For most geometry types the BufferUsage::INDEX slot is used to assign an index buffer, while the BufferUsage::VERTEX is used to assign the corresponding vertex buffer.

The BufferUsage::VERTEX_ATTRIBUTE slot can get used to assign arbitrary additional vertex data which can get interpolated using the Geometry::interpolate and Geometry::interpolate_n API calls.

The BufferUsage::NORMAL, BufferUsage::TANGENT, and BufferUsage::NORMAL_DERIVATIVE are special buffers required to assign per vertex normals, tangents, and normal derivatives for some curve types.

The BufferUsage::GRID buffer is used to assign the grid primitive buffer for grid geometries (see GeometryKind::GRID).

The BufferUsage::FACE, BufferUsage::LEVEL, BufferUsage::EDGE_CREASE_INDEX, BufferUsage::EDGE_CREASE_WEIGHT, BufferUsage::VERTEX_CREASE_INDEX, BufferUsage::VERTEX_CREASE_WEIGHT, and BufferUsage::HOLE are special buffers required to create subdivision meshes (see GeometryKind::SUBDIVISION).

BufferUsage::FLAGS can get used to add additional flag per primitive of a geometry, and is currently only used for linear curves.

Aliased Type§

#[repr(u32)]
pub enum BufferUsage {
Show 15 variants INDEX = 0, VERTEX = 1, VERTEX_ATTRIBUTE = 2, NORMAL = 3, TANGENT = 4, NORMAL_DERIVATIVE = 5, GRID = 8, FACE = 16, LEVEL = 17, EDGE_CREASE_INDEX = 18, EDGE_CREASE_WEIGHT = 19, VERTEX_CREASE_INDEX = 20, VERTEX_CREASE_WEIGHT = 21, HOLE = 22, FLAGS = 32,
}

Variants§

§

INDEX = 0

§

VERTEX = 1

§

VERTEX_ATTRIBUTE = 2

§

NORMAL = 3

§

TANGENT = 4

§

NORMAL_DERIVATIVE = 5

§

GRID = 8

§

FACE = 16

§

LEVEL = 17

§

EDGE_CREASE_INDEX = 18

§

EDGE_CREASE_WEIGHT = 19

§

VERTEX_CREASE_INDEX = 20

§

VERTEX_CREASE_WEIGHT = 21

§

HOLE = 22

§

FLAGS = 32