[][src]Struct luminance::pipeline::PipelineGate

pub struct PipelineGate<'a, B> where
    B: ?Sized
{ /* fields omitted */ }

Top-most node in a graphics pipeline.

PipelineGate nodes represent the “entry-points” of graphics pipelines. They are used with a Framebuffer to render to and a PipelineState to customize the overall behavior of the pipeline.

Parametricity

  • B, the backend type.

Implementations

impl<'a, B> PipelineGate<'a, B> where
    B: ?Sized
[src]

pub fn new<C>(ctx: &'a mut C) -> Self where
    C: GraphicsContext<Backend = B>, 
[src]

Create a new PipelineGate.

pub fn pipeline<E, D, CS, DS, F>(
    &mut self,
    framebuffer: &Framebuffer<B, D, CS, DS>,
    pipeline_state: &PipelineState,
    f: F
) -> Render<E> where
    B: FramebufferBackend<D> + PipelineBackend<D>,
    D: Dimensionable,
    CS: ColorSlot<B, D>,
    DS: DepthSlot<B, D>,
    F: for<'b> FnOnce(Pipeline<'b, B>, ShadingGate<'b, B>) -> Result<(), E>,
    E: From<PipelineError>, 
[src]

Enter a pipeline node.

This method is the entry-point in a graphics pipeline. It takes a Framebuffer and a PipelineState and a closure that allows to go deeper in the pipeline (i.e. resource graph). The closure is passed a Pipeline for you to dynamically alter the pipeline and a ShadingGate to enter shading nodes.

Errors

PipelineError might be thrown for various reasons, depending on the backend you use. However, this method doesn’t return PipelineError directly: instead, it returns E: From<PipelineError>. This allows you to inject your own error type in the argument closure, allowing for a grainer control of errors inside the pipeline.

Auto Trait Implementations

impl<'a, B: ?Sized> RefUnwindSafe for PipelineGate<'a, B> where
    B: RefUnwindSafe
[src]

impl<'a, B: ?Sized> Send for PipelineGate<'a, B> where
    B: Send
[src]

impl<'a, B: ?Sized> Sync for PipelineGate<'a, B> where
    B: Sync
[src]

impl<'a, B: ?Sized> Unpin for PipelineGate<'a, B>[src]

impl<'a, B> !UnwindSafe for PipelineGate<'a, B>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.