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§
Sourcetype Pipeline: SimpleGraphicsPipeline<B, T>
type Pipeline: SimpleGraphicsPipeline<B, T>
Simple graphics pipeline implementation
Required Methods§
Sourcefn load_shader_set(&self, factory: &mut Factory<B>, aux: &T) -> ShaderSet<B>
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.
Sourcefn 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>
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§
Sourcefn builder(self) -> DescBuilder<B, T, SimpleRenderGroupDesc<Self>>where
Self: Sized,
fn builder(self) -> DescBuilder<B, T, SimpleRenderGroupDesc<Self>>where
Self: Sized,
Make simple render group builder.
Sourcefn buffers(&self) -> Vec<BufferAccess>
fn buffers(&self) -> Vec<BufferAccess>
Get set or buffer resources the node uses.
Sourcefn images(&self) -> Vec<ImageAccess>
fn images(&self) -> Vec<ImageAccess>
Get set or image resources the node uses.
Sourcefn colors(&self) -> Vec<ColorBlendDesc>
fn colors(&self) -> Vec<ColorBlendDesc>
Color blend descs.
Sourcefn depth_stencil(&self) -> Option<DepthStencilDesc>
fn depth_stencil(&self) -> Option<DepthStencilDesc>
Depth stencil desc.
Sourcefn rasterizer(&self) -> Rasterizer
fn rasterizer(&self) -> Rasterizer
Rasterizer desc.
Sourcefn vertices(&self) -> Vec<(Vec<Element<Format>>, ElemStride, VertexInputRate)>
fn vertices(&self) -> Vec<(Vec<Element<Format>>, ElemStride, VertexInputRate)>
Get vertex input.
Sourcefn layout(&self) -> Layout
fn layout(&self) -> Layout
Layout for graphics pipeline
Default implementation for pipeline
will use this.
Sourcefn input_assembler(&self) -> InputAssemblerDesc
fn input_assembler(&self) -> InputAssemblerDesc
Returns the InputAssemblerDesc. Defaults to a TriangleList with Restart disabled, can be overriden.