SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
#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.
Definition at line 21 of file SLGLFrameBuffer.h.
Constructor.
Definition at line 18 of file SLGLFrameBuffer.cpp.
|
inlinevirtual |
Definition at line 25 of file SLGLFrameBuffer.h.
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
Definition at line 116 of file SLGLFrameBuffer.cpp.
void SLGLFrameBuffer::bind | ( | ) |
Sets the size of the buffer storage.
change the render buffer size at will
Definition at line 103 of file SLGLFrameBuffer.cpp.
void SLGLFrameBuffer::clear | ( | ) |
Calls delete and clears data.
clear delete buffers and respectively adjust the stats variables
Definition at line 29 of file SLGLFrameBuffer.cpp.
void SLGLFrameBuffer::deleteGL | ( | ) |
Deletes this buffers.
calls the delete functions only if the buffers exist
Definition at line 37 of file SLGLFrameBuffer.cpp.
|
inline |
Definition at line 53 of file SLGLFrameBuffer.h.
void SLGLFrameBuffer::generate | ( | ) |
Generates the framebuffer.
generate the frame buffer and the render buffer if wanted
Definition at line 55 of file SLGLFrameBuffer.cpp.
|
inline |
Definition at line 56 of file SLGLFrameBuffer.h.
|
inline |
Definition at line 54 of file SLGLFrameBuffer.h.
|
inline |
Definition at line 55 of file SLGLFrameBuffer.h.
void SLGLFrameBuffer::unbind | ( | ) |
|
protected |
static total size of all buffers in bytes
frame buffer identifier
Definition at line 63 of file SLGLFrameBuffer.h.
|
protected |
previously active frame buffer identifier
Definition at line 64 of file SLGLFrameBuffer.h.
|
protected |
height of the render buffer
Definition at line 68 of file SLGLFrameBuffer.h.
|
protected |
render buffer identifier
Definition at line 65 of file SLGLFrameBuffer.h.
|
protected |
width of the render buffer
Definition at line 67 of file SLGLFrameBuffer.h.
|
protected |
size in bytes of this buffer
Definition at line 66 of file SLGLFrameBuffer.h.
|
static |
Definition at line 59 of file SLGLFrameBuffer.h.
|
static |
static total no. of buffers in use
Definition at line 60 of file SLGLFrameBuffer.h.