gfm



class  GLFBO;

OpenGL FrameBuffer Object wrapper.


enum  Usage: int;

FBO usage.


This FBO will be used for drawing.


This FBO will be used for reading.


this(OpenGL gl, Usage usage = Usage.DRAW);

Creates one FBO, with specified usage. OpenGL must have been loaded.

ARB_framebuffer_object must be supported.

Throws
OpenGLException on error.

void  use();

Binds this FBO.

Throws
OpenGLException on error.

void  unuse();

Unbinds this FBO.

Throws
OpenGLException on error.

GLFBOAttachment  color(int i);

Returns
A FBO  color attachment.
Parameters
int i Index of  color attachment.

GLFBOAttachment  depth();

Returns
FBO  depth attachment.

GLFBOAttachment  stencil();

Returns
FBO  stencil attachment.

class  GLFBOAttachment;

Defines one FBO attachment.


void  attach(GLTexture1D tex, int level = 0);

Attaches a 1D texture to the FBO.

Throws
OpenGLException on error.

void  attach(GLTexture2D tex, int level = 0);

Attaches a 2D texture to the FBO.

Throws
OpenGLException on error.

void  attach(GLTexture3D tex, int layer, int level);

Attaches a 3D texture to the FBO.

Throws
OpenGLException on error.

void  attach(GLTexture1DArray tex, int layer);

Attaches a 1D texture array to the FBO.

Throws
OpenGLException on error.

void  attach(GLTexture2DArray tex, int layer);

Attaches a 2D texture array to the FBO.

Throws
OpenGLException on error.

void  attach(GLTextureRectangle tex);

Attaches a rectangle texture to the FBO.

Throws
OpenGLException on error.

void  attach(GLTexture2DMultisample tex);

Attaches a multisampled 2D texture to the FBO.

Throws
OpenGLException on error.

void  attach(GLTexture2DMultisampleArray tex, int layer);

Attaches a multisampled 2D texture array to the FBO.

Throws
OpenGLException on error.

void  attach(GLRenderBuffer buffer);

Attaches a renderbuffer to the FBO.

Throws
OpenGLException on error.