CustomPipeBuilder

Trait CustomPipeBuilder 

Source
pub trait CustomPipeBuilder {
    type Pipe: CustomPipe;

    // Required method
    fn build(
        &mut self,
        device: &Device,
        bgl_common: &BindGroupLayout,
        tex_format: TextureFormat,
    ) -> Self::Pipe;

    // Provided method
    fn device_descriptor() -> DeviceDescriptor<'static> { ... }
}
Expand description

Builder for a CustomPipe

Required Associated Types§

Required Methods§

Source

fn build( &mut self, device: &Device, bgl_common: &BindGroupLayout, tex_format: TextureFormat, ) -> Self::Pipe

Build a pipe

A “common” bind group with layout bgl_common is available, supplying window sizing and theme lighting information (refer to existing pipes and shaders for usage). Usage is optional.

The given texture format should be used to construct a compatible wgpu::RenderPipeline.

Provided Methods§

Source

fn device_descriptor() -> DeviceDescriptor<'static>

Request a device supporting these features and limits

See wgpu::Adapter::request_device and wgpu::DeviceDescriptor doc.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CustomPipeBuilder for ()

A dummy implementation (does nothing)

Source§

type Pipe = ()

Source§

fn build( &mut self, _: &Device, _: &BindGroupLayout, _: TextureFormat, ) -> Self::Pipe

Implementors§