Struct rin::gl::Fbo[][src]

pub struct Fbo<C = ColorAttachment, D = DepthAttachment> { /* fields omitted */ }

Wrapper for an OpenGL frame buffer object

Contains a depth attachment and optionally 1 or more color attachments

Implementations

impl<C, D> Fbo<C, D>[src]

pub fn with_depth<'a, D2>(&'a self, depth: D2) -> Result<Fbo<&'a C, D2>, Error> where
    D2: BorrowDepthAttach,
    &'a C: BorrowColorAttach
[src]

pub fn with_colors<'a, C2>(
    &'a self,
    colors: Vec<C2, Global>
) -> Result<Fbo<C2, &'a D>, Error> where
    C2: BorrowColorAttach,
    &'a D: BorrowDepthAttach
[src]

pub fn with_colors_no_depth<C2>(
    &self,
    colors: Vec<C2, Global>
) -> Result<Fbo<C2, DepthAttachment>, Error> where
    C2: BorrowColorAttach
[src]

pub fn with<C2, D2, DD>(
    &self,
    colors: Vec<C2, Global>,
    depth: DD
) -> Result<Fbo<C2, D2>, Error> where
    D2: BorrowDepthAttach,
    C2: BorrowColorAttach,
    DD: Into<Option<D2>>, 
[src]

impl<C, D> Fbo<C, D>[src]

pub fn blit<C2, D2>(
    &self,
    fbo2: &mut Fbo<C2, D2>,
    src_rect: &Rect,
    dst_rect: &Rect
)
[src]

Copy the contents of the color attachments of this Fbo to dst

From the src_rect rectangle to dst_rect

pub fn blit_color_attachment<C2, D2>(
    &self,
    attachment: u32,
    fbo2: &mut Fbo<C2, D2>,
    src_rect: &Rect,
    dst_rect: &Rect
)
[src]

Copy the contents of the color attachments of this Fbo to dst

From the src_rect rectangle to dst_rect

pub fn blit_depth<C2, D2>(
    &self,
    fbo2: &mut Fbo<C2, D2>,
    src_rect: &Rect,
    dst_rect: &Rect
)
[src]

Copy the contents of the depth attachments of this Fbo to dst

From the src_rect rectangle to dst_rect

pub fn invalidate_color(&self)[src]

pub fn invalidate_depth(&self)[src]

pub fn id(&self) -> u32[src]

GL id

pub fn color(&self, idx: usize) -> Option<&C>[src]

Returns the color attachent idx if it exists

pub fn depth(&self) -> Option<&D>[src]

Returns the depth attachent

pub fn into_attachments(self) -> (Vec<C, Global>, Option<D>)[src]

pub unsafe fn read_to<T>(
    &self,
    x: i32,
    y: i32,
    width: i32,
    height: i32,
    format: u32,
    ty: u32,
    pixels: &mut [T]
)
[src]

pub unsafe fn read_to_buffer<T, B>(
    &self,
    x: i32,
    y: i32,
    width: i32,
    height: i32,
    format: u32,
    ty: u32,
    buffer: &mut B
) where
    B: BufferRange<T>, 
[src]

impl<C, D> Fbo<C, D> where
    C: BorrowColorAttach,
    D: BorrowDepthAttach
[src]

pub fn viewport(&self) -> Rect[src]

Returns the default viewport for this Fbo

pub fn width(&self) -> u32[src]

Returns the width for this Fbo

pub fn height(&self) -> u32[src]

Returns the height for this Fbo

pub fn aspect_ratio(&self) -> f32[src]

Returns the aspect ratio for this Fbo

pub fn size(&self) -> (u32, u32)[src]

Returns the width and height for this Fbo

impl<C, D> Fbo<C, D> where
    C: Borrow<ColorAttachment>,
    D: Borrow<DepthAttachment>, 
[src]

pub fn color_tex(&self, idx: usize) -> Option<&Texture>[src]

Returns the color attachent idx’s texture if it exists

pub fn color_cubemap(&self, idx: usize) -> Option<&CubeMap>[src]

Returns the color attachent idx’s cubemap if it exists

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

Returns the depth attachment texture if it exists

pub fn depth_cubemap(&self) -> Option<&CubeMap>[src]

Returns the depth attachment cubemap if it exists

impl<C, D> Fbo<C, D> where
    C: BorrowMut<ColorAttachment>,
    D: BorrowMut<DepthAttachment>, 
[src]

pub fn color_tex_mut(&mut self, idx: usize) -> Option<&mut Texture>[src]

Mutably returns the color attachent idx’s texture if it exists

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

Mutably returns the depth attachment texture if it exists

Trait Implementations

impl<C, D> Debug for Fbo<C, D> where
    C: Debug,
    D: Debug
[src]

impl<'a, C, D> OffscreenBuffer for &'a Fbo<C, D> where
    C: BorrowColorAttach,
    D: BorrowDepthAttach
[src]

type ColorAttach = C

type DepthAttach = D

impl<'a, C, D> OffscreenBuffer for Fbo<C, D> where
    C: BorrowColorAttach,
    D: BorrowDepthAttach
[src]

type ColorAttach = C

type DepthAttach = D

impl<'a> Render2d for &'a Fbo<ColorAttachment, DepthAttachment>[src]

type Material = BasicMaterial<&'a Texture>

Auto Trait Implementations

impl<C = ColorAttachment, D = DepthAttachment> !RefUnwindSafe for Fbo<C, D>

impl<C = ColorAttachment, D = DepthAttachment> !Send for Fbo<C, D>

impl<C = ColorAttachment, D = DepthAttachment> !Sync for Fbo<C, D>

impl<C, D> Unpin for Fbo<C, D> where
    C: Unpin,
    D: Unpin

impl<C = ColorAttachment, D = DepthAttachment> !UnwindSafe for Fbo<C, D>

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> Downcast for T where
    T: Any
[src]

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

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

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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.

impl<F> UntypedOffscreenBuffer for F where
    F: OffscreenBuffer
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]