[][src]Struct ggraphics::RenderPass

pub struct RenderPass {
    pub pipelines: Vec<Box<dyn Pipeline>>,
    // some fields omitted
}

Currently, no input framebuffers or such. We're not actually intending to reproduce Rendy's Graph type here. This may eventually feed into a bounce buffer or such though.

Fields

pipelines: Vec<Box<dyn Pipeline>>

The pipelines to draw in the render pass.

Methods

impl RenderPass[src]

pub unsafe fn new(
    ctx: &mut GlContext,
    width: usize,
    height: usize,
    clear_color: (f32, f32, f32, f32)
) -> Self
[src]

Make a new render pass rendering to a texture.

pub unsafe fn new_screen(
    _ctx: &mut GlContext,
    width: usize,
    height: usize,
    clear_color: (f32, f32, f32, f32)
) -> Self
[src]

Create a new rnder pass rendering to the screen.

pub fn add_pipeline(&mut self, pipeline: impl Pipeline + 'static)[src]

Add a new pipeline to the renderpass

pub fn get_texture(&self) -> Option<Texture>[src]

Get the texture this render pass outputs to, if any.

pub fn set_viewport(&mut self, x: i32, y: i32, w: i32, h: i32)[src]

Sets the viewport for the render pass. Negative numbers are valid, see glViewport for the math involved.

Auto Trait Implementations

Blanket Implementations

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

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

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

type Error = !

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.

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

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

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