logo
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

Creates an InputAssemblyState with the TriangleList topology and primitive restart disabled.

Sets the primitive topology.

Sets the primitive topology to dynamic.

Enables primitive restart.

Sets primitive restart enable to dynmamic.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.