pub struct InputAssemblerDesc {
pub primitive: Primitive,
pub with_adjacency: bool,
pub restart_index: Option<IndexType>,
}
Expand description
All the information needed to create an input assembler.
Fields§
§primitive: Primitive
Type of the primitive
with_adjacency: bool
When adjacency information is enabled, every even-numbered vertex (every other starting from the first) represents an additional vertex for the primitive, while odd-numbered vertices (every other starting from the second) represent adjacent vertices.
For example, with [a, b, c, d, e, f, g, h]
, [a, c, e, g]
form a triangle strip, and [b, d, f, h]
are the adjacent vertices, where b
, d
,
and f
are adjacent to the first triangle in the strip, and d
, f
, and h
are adjacent
to the second.
restart_index: Option<IndexType>
Describes whether or not primitive restart is supported for an input assembler. Primitive restart is a feature that allows a mark to be placed in an index buffer where it is is “broken” into multiple pieces of geometry.
See https://www.khronos.org/opengl/wiki/Vertex_Rendering#Primitive_Restart for more detail.
Implementations§
Trait Implementations§
Source§impl Clone for InputAssemblerDesc
impl Clone for InputAssemblerDesc
Source§fn clone(&self) -> InputAssemblerDesc
fn clone(&self) -> InputAssemblerDesc
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more