rendy_graph::render

Trait SimpleGraphicsPipelineDesc

Source
pub trait SimpleGraphicsPipelineDesc<B: Backend, T: ?Sized>: Debug {
    type Pipeline: SimpleGraphicsPipeline<B, T>;

    // Required methods
    fn load_shader_set(&self, factory: &mut Factory<B>, aux: &T) -> ShaderSet<B>;
    fn build<'a>(
        self,
        ctx: &GraphContext<B>,
        factory: &mut Factory<B>,
        queue: QueueId,
        aux: &T,
        buffers: Vec<NodeBuffer>,
        images: Vec<NodeImage>,
        set_layouts: &[Handle<DescriptorSetLayout<B>>],
    ) -> Result<Self::Pipeline, CreationError>;

    // Provided methods
    fn builder(self) -> DescBuilder<B, T, SimpleRenderGroupDesc<Self>>
       where Self: Sized { ... }
    fn buffers(&self) -> Vec<BufferAccess> { ... }
    fn images(&self) -> Vec<ImageAccess> { ... }
    fn colors(&self) -> Vec<ColorBlendDesc> { ... }
    fn depth_stencil(&self) -> Option<DepthStencilDesc> { ... }
    fn rasterizer(&self) -> Rasterizer { ... }
    fn vertices(
        &self,
    ) -> Vec<(Vec<Element<Format>>, ElemStride, VertexInputRate)> { ... }
    fn layout(&self) -> Layout { ... }
    fn input_assembler(&self) -> InputAssemblerDesc { ... }
    fn pipeline(&self) -> Pipeline { ... }
}
Expand description

Descriptor for simple graphics pipeline implementation.

Required Associated Types§

Source

type Pipeline: SimpleGraphicsPipeline<B, T>

Simple graphics pipeline implementation

Required Methods§

Source

fn load_shader_set(&self, factory: &mut Factory<B>, aux: &T) -> ShaderSet<B>

Load shader set. This function should utilize the provided ShaderSetBuilder reflection class and return the compiled ShaderSet.

§Parameters

factory - factory to create shader modules.

aux - auxiliary data container. May be anything the implementation desires.

Source

fn build<'a>( self, ctx: &GraphContext<B>, factory: &mut Factory<B>, queue: QueueId, aux: &T, buffers: Vec<NodeBuffer>, images: Vec<NodeImage>, set_layouts: &[Handle<DescriptorSetLayout<B>>], ) -> Result<Self::Pipeline, CreationError>

Build pass instance.

Provided Methods§

Source

fn builder(self) -> DescBuilder<B, T, SimpleRenderGroupDesc<Self>>
where Self: Sized,

Make simple render group builder.

Source

fn buffers(&self) -> Vec<BufferAccess>

Get set or buffer resources the node uses.

Source

fn images(&self) -> Vec<ImageAccess>

Get set or image resources the node uses.

Source

fn colors(&self) -> Vec<ColorBlendDesc>

Color blend descs.

Source

fn depth_stencil(&self) -> Option<DepthStencilDesc>

Depth stencil desc.

Source

fn rasterizer(&self) -> Rasterizer

Rasterizer desc.

Source

fn vertices(&self) -> Vec<(Vec<Element<Format>>, ElemStride, VertexInputRate)>

Get vertex input.

Source

fn layout(&self) -> Layout

Layout for graphics pipeline Default implementation for pipeline will use this.

Source

fn input_assembler(&self) -> InputAssemblerDesc

Returns the InputAssemblerDesc. Defaults to a TriangleList with Restart disabled, can be overriden.

Source

fn pipeline(&self) -> Pipeline

Graphics pipelines

Implementors§