SLProject 4.0.000
|
#include <SLGLFrameBuffer.h>
Public Member Functions | |
SLGLFrameBuffer (SLsizei rboWidth, SLsizei rboHeight) | |
Constructor. More... | |
virtual | ~SLGLFrameBuffer () |
void | clear () |
Calls delete and clears data. More... | |
void | deleteGL () |
Deletes this buffers. More... | |
void | generate () |
Generates the framebuffer. More... | |
void | bind () |
Binds the framebuffer and renderbuffer. More... | |
void | unbind () |
Unbinds the framebuffer and renderbuffer. More... | |
void | bindAndSetBufferStorage (SLsizei width, SLsizei height) |
Sets the size of the buffer storage. More... | |
void | attachTexture2D (SLenum attachment, SLenum target, SLGLTexture *texture, SLint level=0) |
Attaches texture image to framebuffer. More... | |
SLuint | fboId () |
SLuint | rboId () |
SLsizei | rboWidth () |
SLsizei | rboHeight () |
Static Public Attributes | |
static SLuint | totalBufferCount = 0 |
static SLuint | totalBufferSize = 0 |
static total no. of buffers in use More... | |
Protected Attributes | |
SLuint | _fboId |
static total size of all buffers in bytes More... | |
SLuint | _prevFboId |
previously active frame buffer identifier More... | |
SLuint | _rboId |
render buffer identifier More... | |
SLuint | _sizeBytes |
size in bytes of this buffer More... | |
SLsizei | _rboWidth |
width of the render buffer More... | |
SLsizei | _rboHeight |
height of the render buffer More... | |
The frame buffer class generates a frame buffer and a render buffer, with the default size of 512x512, this can also in run time be changed.
|
inlinevirtual |
void SLGLFrameBuffer::attachTexture2D | ( | SLenum | attachment, |
SLenum | target, | ||
SLGLTexture * | texture, | ||
SLint | level = 0 |
||
) |
Attaches texture image to framebuffer.
attach one 2D texture to the frame buffer
void SLGLFrameBuffer::bind | ( | ) |
Binds the framebuffer and renderbuffer.
Sets the size of the buffer storage.
change the render buffer size at will
void SLGLFrameBuffer::clear | ( | ) |
Calls delete and clears data.
clear delete buffers and respectively adjust the stats variables
void SLGLFrameBuffer::deleteGL | ( | ) |
Deletes this buffers.
calls the delete functions only if the buffers exist
|
inline |
void SLGLFrameBuffer::generate | ( | ) |
Generates the framebuffer.
generate the frame buffer and the render buffer if wanted
|
inline |
|
inline |
|
inline |
void SLGLFrameBuffer::unbind | ( | ) |
Unbinds the framebuffer and renderbuffer.
|
protected |
static total size of all buffers in bytes
frame buffer identifier
|
protected |
previously active frame buffer identifier
|
protected |
height of the render buffer
|
protected |
render buffer identifier
|
protected |
width of the render buffer
|
protected |
size in bytes of this buffer
|
static |
|
static |
static total no. of buffers in use