Enum vulkano::pipeline::graphics::input_assembly::PrimitiveTopology
source · #[non_exhaustive]#[repr(i32)]pub enum PrimitiveTopology {
PointList = 0,
LineList = 1,
LineStrip = 2,
TriangleList = 3,
TriangleStrip = 4,
TriangleFan = 5,
LineListWithAdjacency = 6,
LineStripWithAdjacency = 7,
TriangleListWithAdjacency = 8,
TriangleStripWithAdjacency = 9,
PatchList = 10,
}
Expand description
Describes how vertices must be grouped together to form primitives.
When DynamicState::PrimitiveTopology
is used, if the
dynamic_primitive_topology_unrestricted
device property is false
, then
the dynamically set primitive topology must belong to the same topology class as what
was set during pipeline creation.
In practice, this is simply the first word in the name of the topology.
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 = 0
A series of separate point primitives.
Topology class: Point
LineList = 1
A series of separate line primitives.
Topology class: Line
LineStrip = 2
A series of consecutive line primitives, with consecutive lines sharing a vertex.
Topology class: Line
TriangleList = 3
A series of separate triangle primitives.
Topology class: Triangle
TriangleStrip = 4
A series of consecutive triangle primitives, with consecutive triangles sharing an edge (two vertices).
Topology class: Triangle
TriangleFan = 5
A series of consecutive triangle primitives, with all triangles sharing a common vertex (the first).
On portability subset
devices, the triangle_fans
feature must be enabled on the device.
Topology class: Triangle
LineListWithAdjacency = 6
As LineList, but with adjacency, used in combination with geometry shaders. Requires the [
geometry_shader`](crate::device::Features::geometry_shader) feature.
Topology class: Line
LineStripWithAdjacency = 7
As LineStrip
, but with adjacency, used in combination with geometry shaders. Requires the
geometry_shader
feature.
Topology class: Line
TriangleListWithAdjacency = 8
As TriangleList
, but with adjacency, used in combination with geometry shaders. Requires
the geometry_shader
feature.
Topology class: Triangle
TriangleStripWithAdjacency = 9
As TriangleStrip
, but with adjacency, used in combination with geometry shaders. Requires
the geometry_shader
feature.
Topology class: Triangle
PatchList = 10
Separate patch primitives, used in combination with tessellation shaders. Requires the
tessellation_shader
feature.
Topology class: Patch
Trait Implementations§
source§impl Clone for PrimitiveTopology
impl Clone for PrimitiveTopology
source§fn clone(&self) -> PrimitiveTopology
fn clone(&self) -> PrimitiveTopology
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PrimitiveTopology
impl Debug for PrimitiveTopology
source§impl Default for PrimitiveTopology
impl Default for PrimitiveTopology
source§impl From<PrimitiveTopology> for PrimitiveTopology
impl From<PrimitiveTopology> for PrimitiveTopology
source§fn from(val: PrimitiveTopology) -> Self
fn from(val: PrimitiveTopology) -> Self
source§impl Hash for PrimitiveTopology
impl Hash for PrimitiveTopology
source§impl PartialEq for PrimitiveTopology
impl PartialEq for PrimitiveTopology
source§fn eq(&self, other: &PrimitiveTopology) -> bool
fn eq(&self, other: &PrimitiveTopology) -> bool
self
and other
values to be equal, and is used
by ==
.