Enum vulkano::pipeline::graphics::input_assembly::PrimitiveTopology
source · [−]#[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
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
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PrimitiveTopology
impl Debug for PrimitiveTopology
sourceimpl Default for PrimitiveTopology
impl Default for PrimitiveTopology
sourceimpl From<PrimitiveTopology> for PrimitiveTopology
impl From<PrimitiveTopology> for PrimitiveTopology
sourcefn from(val: PrimitiveTopology) -> PrimitiveTopology
fn from(val: PrimitiveTopology) -> PrimitiveTopology
Performs the conversion.
sourceimpl Hash for PrimitiveTopology
impl Hash for PrimitiveTopology
impl Copy for PrimitiveTopology
impl Eq for PrimitiveTopology
impl StructuralEq for PrimitiveTopology
impl StructuralPartialEq for PrimitiveTopology
Auto Trait Implementations
impl RefUnwindSafe for PrimitiveTopology
impl Send for PrimitiveTopology
impl Sync for PrimitiveTopology
impl Unpin for PrimitiveTopology
impl UnwindSafe for PrimitiveTopology
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more