Struct nannou_wgpu::RenderPipelineBuilder[][src]

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

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.

Implementations

pub const DEFAULT_SHADER_ENTRY_POINT: &'static str

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

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

The name of the entry point in the compiled shader.

There must be a function that returns void with this name in the shader.

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

The name of the entry point in the compiled shader.

There must be a function that returns void with this name in the shader.

Specify a compiled fragment shader for the render pipeline.

Specify the full primitive state.

Describes the state of primitive assembly and rasterization in a render pipeline.

The face to consider the front for the purpose of culling and stencil operations.

The face culling mode.

Specify the primitive topology.

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

Controls the way each polygon is rasterized. Can be either Fill (default), Line or Point.

Setting this to something other than Fill requires Features::NON_FILL_POLYGON_MODE to be enabled.

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

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

The texture formrat of the image that this pipelinew ill render to.

Must match the format of the corresponding color attachment.

The color blending used for this pipeline.

The alpha blending used for this pipeline.

Mask which enables/disables writes to different color/alpha channel.

Specify the full depth stencil state.

Format of the depth/stencil buffer. Must be one of the depth formats. Must match the format of the depth/stencil attachment.

Comparison function used to compare depth values in the depth test.

Specify the full set of stencil parameters.

Front face mode.

Back face mode.

Stencil values are AND’d with this mask when reading and writing from the stencil buffer. Only low 8 bits are used.

Stencil values are AND’d with this mask when writing to the stencil buffer. Only low 8 bits are used.

Specify the full set of depth bias parameters.

Describes the biasing setting for the depth target.

Constant depth biasing factor, in basic units of the depth format.

Slope depth biasing factor.

Depth bias clamp value (absolute).

If enabled polygon depth is clamped to 0-1 range instead of being clipped.

Requires Features::DEPTH_CLAMPING enabled.

Add a new vertex buffer descriptor to the render pipeline.

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

The vertex stride is assumed to be equal to size_of::<V>(). If this is not the case, consider using add_vertex_buffer_layout instead.

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

Specify the full multisample state.

The number of samples calculated per pixel (for MSAA).

For non-multisampled textures, this should be 1 (the default).

Bitmask that restricts the samples of a pixel modified by this pipeline. All samples can be enabled using the value !0 (the default).

When enabled, produces another sample mask per pixel based on the alpha output value, that is ANDed with the sample_mask and the primitive coverage to restrict the set of samples affected by a primitive.

The implicit mask produced for alpha of zero is guaranteed to be zero, and for alpha of one is guaranteed to be all 1-s.

Disabled by default.

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

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

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. 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.