rendy_graph::render

Trait SimpleGraphicsPipeline

Source
pub trait SimpleGraphicsPipeline<B: Backend, T: ?Sized>:
    Debug
    + Sized
    + Send
    + Sync
    + 'static {
    type Desc: SimpleGraphicsPipelineDesc<B, T, Pipeline = Self>;

    // Required methods
    fn draw(
        &mut self,
        layout: &B::PipelineLayout,
        encoder: RenderPassEncoder<'_, B>,
        index: usize,
        aux: &T,
    );
    fn dispose(self, factory: &mut Factory<B>, aux: &T);

    // Provided methods
    fn builder() -> DescBuilder<B, T, SimpleRenderGroupDesc<Self::Desc>>
       where Self::Desc: Default { ... }
    fn prepare(
        &mut self,
        _factory: &Factory<B>,
        _queue: QueueId,
        _set_layouts: &[Handle<DescriptorSetLayout<B>>],
        _index: usize,
        _aux: &T,
    ) -> PrepareResult { ... }
}
Expand description

Simple render pipeline.

Required Associated Types§

Source

type Desc: SimpleGraphicsPipelineDesc<B, T, Pipeline = Self>

This pipeline descriptor.

Required Methods§

Source

fn draw( &mut self, layout: &B::PipelineLayout, encoder: RenderPassEncoder<'_, B>, index: usize, aux: &T, )

Record drawing commands to the command buffer provided.

Source

fn dispose(self, factory: &mut Factory<B>, aux: &T)

Free all resources and destroy pipeline instance.

Provided Methods§

Source

fn builder() -> DescBuilder<B, T, SimpleRenderGroupDesc<Self::Desc>>
where Self::Desc: Default,

Make simple render group builder.

Source

fn prepare( &mut self, _factory: &Factory<B>, _queue: QueueId, _set_layouts: &[Handle<DescriptorSetLayout<B>>], _index: usize, _aux: &T, ) -> PrepareResult

Prepare to record drawing commands.

Should return true if commands must be re-recorded.

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.

Implementors§