Struct vulkano::pipeline::graphics::input_assembly::InputAssemblyState
source · [−]pub struct InputAssemblyState {
pub topology: PartialStateMode<PrimitiveTopology, PrimitiveTopologyClass>,
pub primitive_restart_enable: StateMode<bool>,
}
Expand description
The state in a graphics pipeline describing how the input assembly stage should behave.
Fields
topology: PartialStateMode<PrimitiveTopology, PrimitiveTopologyClass>
The type of primitives.
Note that some topologies require a feature to be enabled on the device.
If set to Dynamic
, the device API version must be at least 1.3, or the
extended_dynamic_state
feature must be
enabled on the device.
primitive_restart_enable: StateMode<bool>
If true, then when drawing with an index buffer, the special index value consisting of the
maximum unsigned value (0xff
, 0xffff
or 0xffffffff
) will tell the GPU that it is the
end of the current primitive. A new primitive will restart at the next index.
Primitive restart is mostly useful in combination with “strip” and “fan” topologies. “List” topologies require a feature to be enabled on the device when combined with primitive restart.
If set to Dynamic
, the device API version must be at least 1.3, or the
extended_dynamic_state2
feature must
be enabled on the device.
Implementations
sourceimpl InputAssemblyState
impl InputAssemblyState
sourcepub fn new() -> Self
pub fn new() -> Self
Creates an InputAssemblyState
with the TriangleList
topology and primitive restart
disabled.
sourcepub fn topology(self, topology: PrimitiveTopology) -> Self
pub fn topology(self, topology: PrimitiveTopology) -> Self
Sets the primitive topology.
sourcepub fn topology_dynamic(self, topology_class: PrimitiveTopologyClass) -> Self
pub fn topology_dynamic(self, topology_class: PrimitiveTopologyClass) -> Self
Sets the primitive topology to dynamic.
sourcepub fn primitive_restart_enable(self) -> Self
pub fn primitive_restart_enable(self) -> Self
Enables primitive restart.
sourcepub fn primitive_restart_enable_dynamic(self) -> Self
pub fn primitive_restart_enable_dynamic(self) -> Self
Sets primitive restart enable to dynmamic.
Trait Implementations
sourceimpl Clone for InputAssemblyState
impl Clone for InputAssemblyState
sourcefn clone(&self) -> InputAssemblyState
fn clone(&self) -> InputAssemblyState
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for InputAssemblyState
impl Debug for InputAssemblyState
sourceimpl Default for InputAssemblyState
impl Default for InputAssemblyState
sourcefn default() -> Self
fn default() -> Self
Returns InputAssemblyState::new()
.