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
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 InputAssemblyState
impl Debug for InputAssemblyState
sourceimpl Default for InputAssemblyState
impl Default for InputAssemblyState
sourcefn default() -> Self
fn default() -> Self
Returns InputAssemblyState::new()
.
impl Copy for InputAssemblyState
Auto Trait Implementations
impl RefUnwindSafe for InputAssemblyState
impl Send for InputAssemblyState
impl Sync for InputAssemblyState
impl Unpin for InputAssemblyState
impl UnwindSafe for InputAssemblyState
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