Struct vulkano::pipeline::graphics::input_assembly::InputAssemblyState
source · pub struct InputAssemblyState {
pub topology: PrimitiveTopology,
pub primitive_restart_enable: bool,
pub _ne: NonExhaustive,
}
Expand description
The state in a graphics pipeline describing how the input assembly stage should behave.
Fields§
§topology: PrimitiveTopology
The type of 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
topology
.
In practice, this is simply the first word in the name of the topology.
The default value is PrimitiveTopology::TriangleList
.
primitive_restart_enable: 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.
The default value is false
.
_ne: NonExhaustive
Implementations§
source§impl InputAssemblyState
impl InputAssemblyState
sourcepub fn new() -> Self
👎Deprecated since 0.34.0: use InputAssemblyState::default
instead
pub fn new() -> Self
InputAssemblyState::default
insteadCreates an InputAssemblyState
with the TriangleList
topology and primitive restart
disabled.
sourcepub fn topology(self, topology: PrimitiveTopology) -> Self
👎Deprecated since 0.34.0
pub fn topology(self, topology: PrimitiveTopology) -> Self
Sets the primitive topology.
sourcepub fn primitive_restart_enable(self) -> Self
👎Deprecated since 0.34.0
pub fn primitive_restart_enable(self) -> Self
Enables primitive restart.
Trait Implementations§
source§impl Clone for InputAssemblyState
impl Clone for InputAssemblyState
source§fn clone(&self) -> InputAssemblyState
fn clone(&self) -> InputAssemblyState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InputAssemblyState
impl Debug for InputAssemblyState
source§impl Default for InputAssemblyState
impl Default for InputAssemblyState
source§fn default() -> Self
fn default() -> Self
Returns InputAssemblyState::new()
.