PrimitiveStateBuilder

Struct PrimitiveStateBuilder 

Source
pub struct PrimitiveStateBuilder<CS: State> { /* private fields */ }
Expand description

Builder for wgpu::PrimitiveState

Set all required fields and any optional fields, then call build().

Builder field setters:

Implementations§

Source§

impl PrimitiveStateBuilder<Empty>

Source§

impl<CS: State> PrimitiveStateBuilder<CS>

Source

pub fn topology( self, topology: PrimitiveTopology, ) -> PrimitiveStateBuilder<SetTopology<CS>>

Source

pub fn strip_index_format( self, strip_index_format: IndexFormat, ) -> PrimitiveStateBuilder<SetStripIndexFormat<CS>>

Setter for wgpu::PrimitiveState::strip_index_format. Optional, defaults to None.

Source

pub fn maybe_strip_index_format( self, strip_index_format: Option<IndexFormat>, ) -> PrimitiveStateBuilder<SetStripIndexFormat<CS>>

Setter for wgpu::PrimitiveState::strip_index_format. Optional, defaults to None.

Source

pub fn front_face( self, front_face: FrontFace, ) -> PrimitiveStateBuilder<SetFrontFace<CS>>

Setter for wgpu::PrimitiveState::front_face. Optional, defaults to wgpu::FrontFace::Ccw.

Source

pub fn cull_mode( self, cull_mode: Face, ) -> PrimitiveStateBuilder<SetCullMode<CS>>

Setter for wgpu::PrimitiveState::cull_mode. Optional, defaults to None.

Source

pub fn maybe_cull_mode( self, cull_mode: Option<Face>, ) -> PrimitiveStateBuilder<SetCullMode<CS>>

Setter for wgpu::PrimitiveState::cull_mode. Optional, defaults to None.

Source

pub fn unclipped_depth( self, unclipped_depth: bool, ) -> PrimitiveStateBuilder<SetUnclippedDepth<CS>>

Setter for wgpu::PrimitiveState::unclipped_depth. Optional, defaults to false.

Source

pub fn polygon_mode( self, polygon_mode: PolygonMode, ) -> PrimitiveStateBuilder<SetPolygonMode<CS>>

Source

pub fn conservative( self, conservative: bool, ) -> PrimitiveStateBuilder<SetConservative<CS>>

Setter for wgpu::PrimitiveState::conservative. Optional, defaults to false.

Source§

impl<CS: Complete> PrimitiveStateBuilder<CS>

Source

pub fn build(self) -> PrimitiveState

Trait Implementations§

Auto Trait Implementations§

§

impl<CS> Freeze for PrimitiveStateBuilder<CS>

§

impl<CS> RefUnwindSafe for PrimitiveStateBuilder<CS>

§

impl<CS> Send for PrimitiveStateBuilder<CS>
where <CS as State>::Topology: Send, <CS as State>::StripIndexFormat: Send, <CS as State>::FrontFace: Send, <CS as State>::CullMode: Send, <CS as State>::UnclippedDepth: Send, <CS as State>::PolygonMode: Send, <CS as State>::Conservative: Send,

§

impl<CS> Sync for PrimitiveStateBuilder<CS>
where <CS as State>::Topology: Sync, <CS as State>::StripIndexFormat: Sync, <CS as State>::FrontFace: Sync, <CS as State>::CullMode: Sync, <CS as State>::UnclippedDepth: Sync, <CS as State>::PolygonMode: Sync, <CS as State>::Conservative: Sync,

§

impl<CS> Unpin for PrimitiveStateBuilder<CS>
where <CS as State>::Topology: Unpin, <CS as State>::StripIndexFormat: Unpin, <CS as State>::FrontFace: Unpin, <CS as State>::CullMode: Unpin, <CS as State>::UnclippedDepth: Unpin, <CS as State>::PolygonMode: Unpin, <CS as State>::Conservative: Unpin,

§

impl<CS> UnwindSafe for PrimitiveStateBuilder<CS>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,