Struct RenderPipeline
#[non_exhaustive]pub struct RenderPipeline {
pub id: Identifier,
pub fragment: Identifier,
pub vertex_format: PipelineVertexFormat,
pub blend: PipelineBlend,
pub depth: WorldDepth,
}Expand description
A pipeline registered by Hooks::register_render_pipelines: a fragment shader from the
mod’s assets and the fixed state it draws with. This is a restricted form: the mod supplies
the fragment stage and the host fixes the rest. Vanilla requires a vertex shader and a
primitive type; this API fixes both. The engine builds every GPU object.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: IdentifierThe pipeline’s own name (mymod:glow), in a namespace the mod owns.
fragment: IdentifierThe fragment shader (mymod:glow is assets/mymod/shaders/pipeline/glow.wgsl), as the
mod’s assets or a resource pack supply it.
vertex_format: PipelineVertexFormatWhat the pipeline’s draws are made of.
blend: PipelineBlendHow the shader’s result joins the frame.
depth: WorldDepthWhether nearer world surfaces hide the draw. No pipeline writes depth.
Implementations§
§impl RenderPipeline
impl RenderPipeline
pub fn new(
id: Identifier,
fragment: Identifier,
blend: PipelineBlend,
depth: WorldDepth,
) -> RenderPipeline
pub fn new( id: Identifier, fragment: Identifier, blend: PipelineBlend, depth: WorldDepth, ) -> RenderPipeline
Describe a pipeline that draws PipelineVertexFormat::PositionTexColor geometry.
Trait Implementations§
§impl Clone for RenderPipeline
impl Clone for RenderPipeline
§fn clone(&self) -> RenderPipeline
fn clone(&self) -> RenderPipeline
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more