Struct glin::fbo::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]
impl<C, D> Fbo<C, D>
[src]pub fn with_depth<'a, D2: BorrowDepthAttach>(
&'a self,
depth: D2
) -> Result<Fbo<&'a C, D2>> where
&'a C: BorrowColorAttach,
[src]
&'a self,
depth: D2
) -> Result<Fbo<&'a C, D2>> where
&'a C: BorrowColorAttach,
pub fn with_colors<'a, C2: BorrowColorAttach>(
&'a self,
colors: Vec<C2>
) -> Result<Fbo<C2, &'a D>> where
&'a D: BorrowDepthAttach,
[src]
&'a self,
colors: Vec<C2>
) -> Result<Fbo<C2, &'a D>> where
&'a D: BorrowDepthAttach,
pub fn with_colors_no_depth<C2>(&self, colors: Vec<C2>) -> Result<Fbo<C2>> where
C2: BorrowColorAttach,
[src]
C2: BorrowColorAttach,
pub fn with<C2, D2, DD>(
&self,
colors: Vec<C2>,
depth: DD
) -> Result<Fbo<C2, D2>> where
C2: BorrowColorAttach,
D2: BorrowDepthAttach,
DD: Into<Option<D2>>,
[src]
&self,
colors: Vec<C2>,
depth: DD
) -> Result<Fbo<C2, D2>> where
C2: BorrowColorAttach,
D2: BorrowDepthAttach,
DD: Into<Option<D2>>,
impl<C, D> Fbo<C, D>
[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]
&self,
fbo2: &mut Fbo<C2, D2>,
src_rect: &Rect,
dst_rect: &Rect
)
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]
&self,
attachment: u32,
fbo2: &mut Fbo<C2, D2>,
src_rect: &Rect,
dst_rect: &Rect
)
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]
&self,
fbo2: &mut Fbo<C2, D2>,
src_rect: &Rect,
dst_rect: &Rect
)
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) -> GLuint
[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>, Option<D>)
[src]
pub unsafe fn read_to<T>(
&self,
x: i32,
y: i32,
width: i32,
height: i32,
format: GLenum,
ty: GLenum,
pixels: &mut [T]
)
[src]
&self,
x: i32,
y: i32,
width: i32,
height: i32,
format: GLenum,
ty: GLenum,
pixels: &mut [T]
)
pub unsafe fn read_to_buffer<T, B: BufferRange<T>>(
&self,
x: i32,
y: i32,
width: i32,
height: i32,
format: GLenum,
ty: GLenum,
buffer: &mut B
)
[src]
&self,
x: i32,
y: i32,
width: i32,
height: i32,
format: GLenum,
ty: GLenum,
buffer: &mut B
)
impl<C: BorrowColorAttach, D: BorrowDepthAttach> Fbo<C, D>
[src]
impl<C: BorrowColorAttach, D: BorrowDepthAttach> Fbo<C, D>
[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: Borrow<ColorAttachment>, D: Borrow<DepthAttachment>> Fbo<C, D>
[src]
impl<C: Borrow<ColorAttachment>, D: Borrow<DepthAttachment>> Fbo<C, D>
[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: BorrowMut<ColorAttachment>, D: BorrowMut<DepthAttachment>> Fbo<C, D>
[src]
impl<C: BorrowMut<ColorAttachment>, D: BorrowMut<DepthAttachment>> Fbo<C, D>
[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<'a, C: BorrowColorAttach, D: BorrowDepthAttach> OffscreenBuffer for Fbo<C, D>
[src]
impl<'a, C: BorrowColorAttach, D: BorrowDepthAttach> OffscreenBuffer for Fbo<C, D>
[src]type ColorAttach = C
type DepthAttach = D
fn render_buffer(&self) -> &Fbo<C, D>
[src]
fn color_attachment(&self, idx: usize) -> Option<&C>
[src]
fn depth_attachment(&self) -> Option<&Self::DepthAttach>
[src]
impl<'a, C: BorrowColorAttach, D: BorrowDepthAttach> OffscreenBuffer for &'a Fbo<C, D>
[src]
impl<'a, C: BorrowColorAttach, D: BorrowDepthAttach> OffscreenBuffer for &'a Fbo<C, D>
[src]type ColorAttach = C
type DepthAttach = D
fn render_buffer(&self) -> &Fbo<C, D>
[src]
fn color_attachment(&self, idx: usize) -> Option<&C>
[src]
fn depth_attachment(&self) -> Option<&Self::DepthAttach>
[src]
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,
C: Unpin,
D: Unpin,