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:
- topology Optional, defaults to wgpu::PrimitiveTopology::TriangleList
- strip_index_format Optional, defaults to
None - front_face Optional, defaults to wgpu::FrontFace::Ccw
- cull_mode Optional, defaults to
None - unclipped_depth Optional, defaults to
false - polygon_mode Optional, defaults to wgpu::PolygonMode::Fill
- conservative Optional, defaults to
false
Implementations§
Source§impl PrimitiveStateBuilder<Empty>
impl PrimitiveStateBuilder<Empty>
pub fn new() -> PrimitiveStateBuilder<Empty>
Source§impl<CS: State> PrimitiveStateBuilder<CS>
impl<CS: State> PrimitiveStateBuilder<CS>
Sourcepub fn topology(
self,
topology: PrimitiveTopology,
) -> PrimitiveStateBuilder<SetTopology<CS>>where
CS::Topology: TopologyIsEmpty,
pub fn topology(
self,
topology: PrimitiveTopology,
) -> PrimitiveStateBuilder<SetTopology<CS>>where
CS::Topology: TopologyIsEmpty,
Setter for wgpu::PrimitiveState::topology. Optional, defaults to wgpu::PrimitiveTopology::TriangleList.
Sourcepub fn strip_index_format(
self,
strip_index_format: IndexFormat,
) -> PrimitiveStateBuilder<SetStripIndexFormat<CS>>where
CS::StripIndexFormat: StripIndexFormatIsEmpty,
pub fn strip_index_format(
self,
strip_index_format: IndexFormat,
) -> PrimitiveStateBuilder<SetStripIndexFormat<CS>>where
CS::StripIndexFormat: StripIndexFormatIsEmpty,
Setter for wgpu::PrimitiveState::strip_index_format. Optional, defaults to None.
Sourcepub fn maybe_strip_index_format(
self,
strip_index_format: Option<IndexFormat>,
) -> PrimitiveStateBuilder<SetStripIndexFormat<CS>>where
CS::StripIndexFormat: StripIndexFormatIsEmpty,
pub fn maybe_strip_index_format(
self,
strip_index_format: Option<IndexFormat>,
) -> PrimitiveStateBuilder<SetStripIndexFormat<CS>>where
CS::StripIndexFormat: StripIndexFormatIsEmpty,
Setter for wgpu::PrimitiveState::strip_index_format. Optional, defaults to None.
Sourcepub fn front_face(
self,
front_face: FrontFace,
) -> PrimitiveStateBuilder<SetFrontFace<CS>>where
CS::FrontFace: FrontFaceIsEmpty,
pub fn front_face(
self,
front_face: FrontFace,
) -> PrimitiveStateBuilder<SetFrontFace<CS>>where
CS::FrontFace: FrontFaceIsEmpty,
Setter for wgpu::PrimitiveState::front_face. Optional, defaults to wgpu::FrontFace::Ccw.
Sourcepub fn cull_mode(
self,
cull_mode: Face,
) -> PrimitiveStateBuilder<SetCullMode<CS>>where
CS::CullMode: CullModeIsEmpty,
pub fn cull_mode(
self,
cull_mode: Face,
) -> PrimitiveStateBuilder<SetCullMode<CS>>where
CS::CullMode: CullModeIsEmpty,
Setter for wgpu::PrimitiveState::cull_mode. Optional, defaults to None.
Sourcepub fn maybe_cull_mode(
self,
cull_mode: Option<Face>,
) -> PrimitiveStateBuilder<SetCullMode<CS>>where
CS::CullMode: CullModeIsEmpty,
pub fn maybe_cull_mode(
self,
cull_mode: Option<Face>,
) -> PrimitiveStateBuilder<SetCullMode<CS>>where
CS::CullMode: CullModeIsEmpty,
Setter for wgpu::PrimitiveState::cull_mode. Optional, defaults to None.
Sourcepub fn unclipped_depth(
self,
unclipped_depth: bool,
) -> PrimitiveStateBuilder<SetUnclippedDepth<CS>>where
CS::UnclippedDepth: UnclippedDepthIsEmpty,
pub fn unclipped_depth(
self,
unclipped_depth: bool,
) -> PrimitiveStateBuilder<SetUnclippedDepth<CS>>where
CS::UnclippedDepth: UnclippedDepthIsEmpty,
Setter for wgpu::PrimitiveState::unclipped_depth. Optional, defaults to false.
Sourcepub fn polygon_mode(
self,
polygon_mode: PolygonMode,
) -> PrimitiveStateBuilder<SetPolygonMode<CS>>where
CS::PolygonMode: PolygonModeIsEmpty,
pub fn polygon_mode(
self,
polygon_mode: PolygonMode,
) -> PrimitiveStateBuilder<SetPolygonMode<CS>>where
CS::PolygonMode: PolygonModeIsEmpty,
Setter for wgpu::PrimitiveState::polygon_mode. Optional, defaults to wgpu::PolygonMode::Fill.
Sourcepub fn conservative(
self,
conservative: bool,
) -> PrimitiveStateBuilder<SetConservative<CS>>where
CS::Conservative: ConservativeIsEmpty,
pub fn conservative(
self,
conservative: bool,
) -> PrimitiveStateBuilder<SetConservative<CS>>where
CS::Conservative: ConservativeIsEmpty,
Setter for wgpu::PrimitiveState::conservative. Optional, defaults to false.