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]
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]
D2: BorrowDepthAttach,
&'a C: BorrowColorAttach,
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]
&'a self,
colors: Vec<C2, Global>
) -> Result<Fbo<C2, &'a D>, Error> where
C2: BorrowColorAttach,
&'a D: BorrowDepthAttach,
pub fn with_colors_no_depth<C2>(
&self,
colors: Vec<C2, Global>
) -> Result<Fbo<C2, DepthAttachment>, Error> where
C2: BorrowColorAttach,
[src]
&self,
colors: Vec<C2, Global>
) -> Result<Fbo<C2, DepthAttachment>, Error> where
C2: BorrowColorAttach,
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]
&self,
colors: Vec<C2, Global>,
depth: DD
) -> Result<Fbo<C2, D2>, Error> where
D2: BorrowDepthAttach,
C2: BorrowColorAttach,
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) -> 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]
&self,
x: i32,
y: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
pixels: &mut [T]
)
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]
&self,
x: i32,
y: i32,
width: i32,
height: i32,
format: u32,
ty: u32,
buffer: &mut B
) where
B: BufferRange<T>,
impl<C, D> Fbo<C, D> where
C: BorrowColorAttach,
D: BorrowDepthAttach,
[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]
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]
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<'a, C, D> OffscreenBuffer for &'a Fbo<C, D> where
C: BorrowColorAttach,
D: BorrowDepthAttach,
[src]
impl<'a, C, D> OffscreenBuffer for &'a Fbo<C, D> where
C: BorrowColorAttach,
D: BorrowDepthAttach,
[src]type ColorAttach = C
type DepthAttach = D
pub fn render_buffer(&self) -> &Fbo<C, D>
[src]
pub fn color_attachment(&self, idx: usize) -> Option<&C>
[src]
pub fn depth_attachment(
&self
) -> Option<&<&'a Fbo<C, D> as OffscreenBuffer>::DepthAttach>
[src]
&self
) -> Option<&<&'a Fbo<C, D> as OffscreenBuffer>::DepthAttach>
impl<'a, C, D> OffscreenBuffer for Fbo<C, D> where
C: BorrowColorAttach,
D: BorrowDepthAttach,
[src]
impl<'a, C, D> OffscreenBuffer for Fbo<C, D> where
C: BorrowColorAttach,
D: BorrowDepthAttach,
[src]type ColorAttach = C
type DepthAttach = D
pub fn render_buffer(&self) -> &Fbo<C, D>
[src]
pub fn color_attachment(&self, idx: usize) -> Option<&C>
[src]
pub fn depth_attachment(
&self
) -> Option<&<Fbo<C, D> as OffscreenBuffer>::DepthAttach>
[src]
&self
) -> Option<&<Fbo<C, D> as OffscreenBuffer>::DepthAttach>
impl<'a> Render2d for &'a Fbo<ColorAttachment, DepthAttachment>
[src]
impl<'a> Render2d for &'a Fbo<ColorAttachment, DepthAttachment>
[src]type Material = BasicMaterial<&'a Texture>
pub fn default_material(&'b self) -> BasicMaterial<&'a Texture>
[src]
pub fn render_with_material<R, M>(
&self,
gl: &Renderer<'_, R>,
pos: &Point<f32, U2>,
material: &M
) where
M: Material,
R: RenderSurface,
[src]
&self,
gl: &Renderer<'_, R>,
pos: &Point<f32, U2>,
material: &M
) where
M: Material,
R: RenderSurface,
pub fn render_size_with_material<R, M>(
&self,
gl: &Renderer<'_, R>,
pos: &Point<f32, U2>,
size: &Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>,
material: &M
) where
M: Material,
R: RenderSurface,
[src]
&self,
gl: &Renderer<'_, R>,
pos: &Point<f32, U2>,
size: &Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>,
material: &M
) where
M: Material,
R: RenderSurface,
pub fn render<R>(&self, renderer: &Renderer<'_, R>, pos: &Point<f32, U2>) where
R: RenderSurface,
[src]
R: RenderSurface,
pub fn render_size<R>(
&self,
renderer: &Renderer<'_, R>,
pos: &Point<f32, U2>,
size: &Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) where
R: RenderSurface,
[src]
&self,
renderer: &Renderer<'_, R>,
pos: &Point<f32, U2>,
size: &Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) where
R: RenderSurface,
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,
impl<C = ColorAttachment, D = DepthAttachment> !UnwindSafe for Fbo<C, D>
Blanket Implementations
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<F> UntypedOffscreenBuffer for F where
F: OffscreenBuffer,
[src]
impl<F> UntypedOffscreenBuffer for F where
F: OffscreenBuffer,
[src]