Class Framebuffer

Framebuffer abstraction for offscreen rendering.

class Framebuffer
  : dlib.core.ownership.Owner;

Constructors

NameDescription
this (owner) Constructs an empty framebuffer.
this (w, h, format, depth, owner) Constructs and initializes a framebuffer.

Fields

NameTypeDescription
colorFormat FrameBufferFormatColor buffer format.
framebuffer uintOpenGL framebuffer object.
hasDepthBuffer boolTrue if a depth/stencil buffer is attached.
height uintFramebuffer height in pixels.
width uintFramebuffer width in pixels.

Methods

NameDescription
bind () Binds the framebuffer for drawing.
blitColorBuffer () Blits the color buffer to the default framebuffer.
blitDepthBuffer () Blits the depth/stencil buffer to the default framebuffer.
colorTexture () Returns the OpenGL color texture handle.
depthTexture () Returns the OpenGL depth texture handle.
init (w, h, format, depth) Initializes or reinitializes the framebuffer.
releaseFramebuffer () Releases all OpenGL framebuffer and texture resources.
resize (w, h) Resizes the framebuffer and its attachments.
unbind () Unbinds the framebuffer (restores default framebuffer).
createFramebuffer () Creates the OpenGL framebuffer and attachments.

Description

Manages an OpenGL framebuffer object with color and optional depth/stencil attachments.