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

source

pub fn new() -> Self

👎Deprecated since 0.34.0: use InputAssemblyState::default instead

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

source

pub fn topology(self, topology: PrimitiveTopology) -> Self

👎Deprecated since 0.34.0

Sets the primitive topology.

source

pub fn primitive_restart_enable(self) -> Self

👎Deprecated since 0.34.0

Enables primitive restart.

Trait Implementations§

source§

impl Clone for InputAssemblyState

source§

fn clone(&self) -> InputAssemblyState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InputAssemblyState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for InputAssemblyState

source§

impl Copy for InputAssemblyState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.