Trait luminance::framebuffer::HasFramebuffer
[−]
[src]
pub trait HasFramebuffer: HasTexture + Sized { type Framebuffer; fn new_framebuffer<L, D, CS, DS>(size: D::Size, mipmaps: u32) -> Result<(Self::Framebuffer, Vec<Self::ATexture>, Option<Self::ATexture>), FramebufferError> where L: Layerable, D: Dimensionable, D::Size: Copy, CS: ColorSlot<Self, L, D>, DS: DepthSlot<Self, L, D>; fn free_framebuffer(framebuffer: &mut Self::Framebuffer); fn default_framebuffer() -> Self::Framebuffer; }
Trait to implement to provide framebuffer features.
When creating a new framebuffer with new_framebuffer
, the color and depth formats are passed
and should be used to create internal textures and/or buffers to represent the slots.
Associated Types
type Framebuffer
Framebuffer representation.
Required Methods
fn new_framebuffer<L, D, CS, DS>(size: D::Size, mipmaps: u32) -> Result<(Self::Framebuffer, Vec<Self::ATexture>, Option<Self::ATexture>), FramebufferError> where L: Layerable, D: Dimensionable, D::Size: Copy, CS: ColorSlot<Self, L, D>, DS: DepthSlot<Self, L, D>
Create a new framebuffer.
fn free_framebuffer(framebuffer: &mut Self::Framebuffer)
Free a framebuffer.
fn default_framebuffer() -> Self::Framebuffer
Default framebuffer.