[−][src]Struct luminance::pipeline::PipelineGate
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]
B: ?Sized,
pub fn new<C>(ctx: &'a mut C) -> Self where
C: GraphicsContext<Backend = B>,
[src]
C: GraphicsContext<Backend = B>,
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]
&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>,
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]
B: RefUnwindSafe,
impl<'a, B: ?Sized> Send for PipelineGate<'a, B> where
B: Send,
[src]
B: Send,
impl<'a, B: ?Sized> Sync for PipelineGate<'a, B> where
B: Sync,
[src]
B: Sync,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,