[][src]Struct nannou::wgpu::RenderPipelineBuilder

pub struct RenderPipelineBuilder<'a> { /* fields omitted */ }

A builder type to help simplify the construction of a RenderPipeline.

We've attempted to provide a suite of reasonable defaults in the case that none are provided.

Methods

impl<'a> RenderPipelineBuilder<'a>[src]

pub const DEFAULT_SHADER_ENTRY_POINT: &'static str[src]

pub const DEFAULT_FRONT_FACE: FrontFace[src]

pub const DEFAULT_CULL_MODE: CullMode[src]

pub const DEFAULT_DEPTH_BIAS: i32[src]

pub const DEFAULT_DEPTH_BIAS_SLOPE_SCALE: f32[src]

pub const DEFAULT_DEPTH_BIAS_CLAMP: f32[src]

pub const DEFAULT_RASTERIZATION_STATE: RasterizationStateDescriptor[src]

pub const DEFAULT_PRIMITIVE_TOPOLOGY: PrimitiveTopology[src]

pub const DEFAULT_COLOR_FORMAT: TextureFormat[src]

pub const DEFAULT_COLOR_BLEND: BlendDescriptor[src]

pub const DEFAULT_ALPHA_BLEND: BlendDescriptor[src]

pub const DEFAULT_COLOR_WRITE: ColorWrite[src]

pub const DEFAULT_COLOR_STATE: ColorStateDescriptor[src]

pub const DEFAULT_DEPTH_FORMAT: TextureFormat[src]

pub const DEFAULT_DEPTH_WRITE_ENABLED: bool[src]

pub const DEFAULT_DEPTH_COMPARE: CompareFunction[src]

pub const DEFAULT_STENCIL_FRONT: StencilStateFaceDescriptor[src]

pub const DEFAULT_STENCIL_BACK: StencilStateFaceDescriptor[src]

pub const DEFAULT_STENCIL_READ_MASK: u32[src]

pub const DEFAULT_STENCIL_WRITE_MASK: u32[src]

pub const DEFAULT_DEPTH_STENCIL_STATE: DepthStencilStateDescriptor[src]

pub const DEFAULT_INDEX_FORMAT: IndexFormat[src]

pub const DEFAULT_SAMPLE_COUNT: u32[src]

pub const DEFAULT_SAMPLE_MASK: u32[src]

pub const DEFAULT_ALPHA_TO_COVERAGE_ENABLED: bool[src]

pub fn from_layout(layout: &'a PipelineLayout, vs_mod: &'a ShaderModule) -> Self[src]

Begin building the render pipeline for the given pipeline layout and the vertex shader module.

pub fn from_layout_descriptor<T>(
    layout_desc: T,
    vs_mod: &'a ShaderModule
) -> Self where
    T: IntoPipelineLayoutDescriptor<'a>, 
[src]

Begin building the render pipeline for a pipeline with the given layout descriptor and the vertex shader module.

pub fn vertex_entry_point(self, entry_point: &'a str) -> Self[src]

pub fn fragment_entry_point(self, entry_point: &'a str) -> Self[src]

pub fn fragment_shader(self, fs_mod: &'a ShaderModule) -> Self[src]

Specify a fragment shader for the render pipeline.

pub fn rasterization_state(self, state: RasterizationStateDescriptor) -> Self[src]

Specify the full rasterization state.

pub fn front_face(self, front_face: FrontFace) -> Self[src]

pub fn cull_mode(self, cull_mode: CullMode) -> Self[src]

pub fn depth_bias(self, bias: i32) -> Self[src]

pub fn depth_bias_slope_scale(self, scale: f32) -> Self[src]

pub fn depth_bias_clamp(self, clamp: f32) -> Self[src]

pub fn primitive_topology(self, topology: PrimitiveTopology) -> Self[src]

Specify the primitive topology.

This represents the way vertices will be read from the VertexBuffer.

pub fn color_state(self, state: ColorStateDescriptor) -> Self[src]

Specify the full color state for drawing to the output attachment.

If you have multiple output attachments, see the color_states method.

pub fn color_format(self, format: TextureFormat) -> Self[src]

pub fn color_blend(self, blend: BlendDescriptor) -> Self[src]

pub fn alpha_blend(self, blend: BlendDescriptor) -> Self[src]

pub fn write_mask(self, mask: ColorWrite) -> Self[src]

pub fn depth_stencil_state(self, state: DepthStencilStateDescriptor) -> Self[src]

pub fn depth_format(self, format: TextureFormat) -> Self[src]

pub fn depth_write_enabled(self, enabled: bool) -> Self[src]

pub fn depth_compare(self, compare: CompareFunction) -> Self[src]

pub fn stencil_front(self, stencil: StencilStateFaceDescriptor) -> Self[src]

pub fn stencil_back(self, stencil: StencilStateFaceDescriptor) -> Self[src]

pub fn stencil_read_mask(self, mask: u32) -> Self[src]

pub fn stencil_write_mask(self, mask: u32) -> Self[src]

pub fn index_format(self, format: IndexFormat) -> Self[src]

The format of the type used within the index buffer.

pub fn add_vertex_buffer_descriptor(
    self,
    d: VertexBufferDescriptor<'static>
) -> Self
[src]

Add a new vertex buffer descriptor to the render pipeline.

pub fn add_vertex_buffer<V>(self) -> Self where
    V: VertexDescriptor
[src]

Short-hand for adding a descriptor to the render pipeline describing a buffer of vertices of the given vertex type.

pub fn add_instance_buffer<I>(self) -> Self where
    I: VertexDescriptor
[src]

Short-hand for adding a descriptor to the render pipeline describing a buffer of instances of the given vertex type.

pub fn sample_count(self, sample_count: u32) -> Self[src]

The sample count of the output attachment.

pub fn build(self, device: &Device) -> RenderPipeline[src]

Build the render pipeline layout, its descriptor and ultimately the pipeline itself with the specified parameters.

**Panic!**s in the following occur:

  • A rasterization state field was specified but no fragment shader was given.
  • A color state field was specified but no fragment shader was given.

Trait Implementations

impl<'a> Debug for RenderPipelineBuilder<'a>[src]

Auto Trait Implementations

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,