Struct librashader_runtime_gl::GLFramebuffer
source · pub struct GLFramebuffer { /* private fields */ }Expand description
A handle to an OpenGL FBO and its backing texture with format and size information.
Generally for use as render targets.
Implementations§
source§impl GLFramebuffer
impl GLFramebuffer
sourcepub fn new_from_raw(
texture: GLuint,
fbo: GLuint,
format: GLenum,
size: Size<u32>,
miplevels: u32
) -> GLFramebuffer
pub fn new_from_raw( texture: GLuint, fbo: GLuint, format: GLenum, size: Size<u32>, miplevels: u32 ) -> GLFramebuffer
Create a framebuffer from an already initialized texture and framebuffer.
The framebuffer will not be deleted when this struct is dropped.
Trait Implementations§
source§impl Debug for GLFramebuffer
impl Debug for GLFramebuffer
source§impl Drop for GLFramebuffer
impl Drop for GLFramebuffer
source§impl<T: FramebufferInterface> ScaleFramebuffer<T> for GLFramebuffer
impl<T: FramebufferInterface> ScaleFramebuffer<T> for GLFramebuffer
type Error = FilterChainError
type Context = ()
source§fn scale(
&mut self,
scaling: Scale2D,
format: ImageFormat,
viewport_size: &Size<u32>,
source_size: &Size<u32>,
original_size: &Size<u32>,
should_mipmap: bool,
_context: &Self::Context
) -> Result<Size<u32>>
fn scale( &mut self, scaling: Scale2D, format: ImageFormat, viewport_size: &Size<u32>, source_size: &Size<u32>, original_size: &Size<u32>, should_mipmap: bool, _context: &Self::Context ) -> Result<Size<u32>>
Scale the framebuffer according to the provided parameters, returning the new size.
source§fn scale_framebuffers_with_context<P>(
source_size: Size<u32>,
viewport_size: Size<u32>,
original_size: Size<u32>,
output: &mut [Self],
feedback: &mut [Self],
passes: &[P],
context: &Self::Context,
callback: Option<&mut dyn FnMut(usize, &P, &Self, &Self) -> Result<(), Self::Error>>
) -> Result<(), Self::Error>where
Self: Sized,
P: FilterPassMeta,
fn scale_framebuffers_with_context<P>(
source_size: Size<u32>,
viewport_size: Size<u32>,
original_size: Size<u32>,
output: &mut [Self],
feedback: &mut [Self],
passes: &[P],
context: &Self::Context,
callback: Option<&mut dyn FnMut(usize, &P, &Self, &Self) -> Result<(), Self::Error>>
) -> Result<(), Self::Error>where
Self: Sized,
P: FilterPassMeta,
Scale framebuffers with user provided context.
Auto Trait Implementations§
impl RefUnwindSafe for GLFramebuffer
impl Send for GLFramebuffer
impl Sync for GLFramebuffer
impl Unpin for GLFramebuffer
impl UnwindSafe for GLFramebuffer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more