Struct luminance::framebuffer::Framebuffer [] [src]

pub struct Framebuffer<C, L, D, CS, DS> where C: HasTexture + HasFramebuffer, L: Layerable, D: Dimensionable, D::Size: Copy, CS: ColorSlot<C, L, D>, DS: DepthSlot<C, L, D> {
    pub repr: C::Framebuffer,
    pub color_slot: CS,
    pub depth_slot: DS,
    // some fields omitted
}

Framebuffer with static layering, dimension, access and slots formats.

A Framebuffer is a GPU special object used to render to. Because framebuffers have a layering property, it’s possible to have regular render and layered rendering. The dimension of a framebuffer makes it possible to render to 1D, 2D, 3D and cubemaps.

A framebuffer has two kind of slots:

  • color slot ;
  • depth slot.

A framebuffer can have zero or several color slots and it can have zero or one depth slot. If you use several color slots, you’ll be performing what’s called MRT (M ultiple R ender T argets), enabling to render to several textures at once.

Fields

repr: C::Framebuffer color_slot: CS depth_slot: DS

Methods

impl<C, L, D, CS, DS> Framebuffer<C, L, D, CS, DS> where C: HasTexture + HasFramebuffer, L: Layerable, D: Dimensionable, D::Size: Copy, CS: ColorSlot<C, L, D>, DS: DepthSlot<C, L, D>
[src]

fn new(size: D::Size, mipmaps: u32) -> Result<Framebuffer<C, L, D, CS, DS>, FramebufferError>

Trait Implementations

impl<C: Debug, L: Debug, D: Debug, CS: Debug, DS: Debug> Debug for Framebuffer<C, L, D, CS, DS> where C: HasTexture + HasFramebuffer, L: Layerable, D: Dimensionable, D::Size: Copy, CS: ColorSlot<C, L, D>, DS: DepthSlot<C, L, D>, C::Framebuffer: Debug
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<C> Default for Framebuffer<C, FlatDim2()()> where C: HasTexture + HasFramebuffer
[src]

fn default() -> Self

Returns the "default value" for a type. Read more

impl<C, L, D, CS, DS> Drop for Framebuffer<C, L, D, CS, DS> where C: HasTexture + HasFramebuffer, L: Layerable, D: Dimensionable, D::Size: Copy, CS: ColorSlot<C, L, D>, DS: DepthSlot<C, L, D>
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more