Enum vulkano::pipeline::graphics::input_assembly::PrimitiveTopology
source · [−]#[non_exhaustive]
#[repr(i32)]
pub enum PrimitiveTopology {
PointList,
LineList,
LineStrip,
TriangleList,
TriangleStrip,
TriangleFan,
LineListWithAdjacency,
LineStripWithAdjacency,
TriangleListWithAdjacency,
TriangleStripWithAdjacency,
PatchList,
}
Expand description
Describes how vertices must be grouped together to form primitives.
When enabling primitive restart, “list” topologies require a feature to be enabled on the device:
- The
PatchList
topology requires theprimitive_topology_patch_list_restart
feature. - All other “list” topologies require the
primitive_topology_list_restart
feature.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
PointList
A series of separate point primitives.
LineList
A series of separate line primitives.
LineStrip
A series of consecutive line primitives, with consecutive lines sharing a vertex.
TriangleList
A series of separate triangle primitives.
TriangleStrip
A series of consecutive triangle primitives, with consecutive triangles sharing an edge (two vertices).
TriangleFan
A series of consecutive triangle primitives, with all triangles sharing a common vertex (the first).
LineListWithAdjacency
As LineList, but with adjacency, used in combination with geometry shaders. Requires the [
geometry_shader`](crate::device::Features::geometry_shader) feature.
LineStripWithAdjacency
As LineStrip
, but with adjacency, used in combination with geometry shaders. Requires the
geometry_shader
feature.
TriangleListWithAdjacency
As TriangleList
, but with adjacency, used in combination with geometry shaders. Requires
the geometry_shader
feature.
TriangleStripWithAdjacency
As TriangleStrip
, but with adjacency, used in combination with geometry shaders. Requires
the geometry_shader
feature.
PatchList
Separate patch primitives, used in combination with tessellation shaders. Requires the
tessellation_shader
feature.
Implementations
sourceimpl PrimitiveTopology
impl PrimitiveTopology
sourcepub fn class(&self) -> PrimitiveTopologyClass
pub fn class(&self) -> PrimitiveTopologyClass
Returns the topology class of this topology.
Trait Implementations
sourceimpl Clone for PrimitiveTopology
impl Clone for PrimitiveTopology
sourcefn clone(&self) -> PrimitiveTopology
fn clone(&self) -> PrimitiveTopology
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more