Developer Documentation
|
#include <AC>
Classes | |
struct | RenderTexture |
attached textures More... | |
Public Member Functions | |
FBO () | |
Default constructor. More... | |
~FBO () | |
Destructor. More... | |
void | init () |
function to generate the framebuffer object More... | |
void | del () |
delete fbo and all internally created render textures More... | |
GLsizei | setMultisampling (GLsizei _samples, GLboolean _fixedsamplelocations=GL_TRUE) |
GLsizei | getMultisamplingCount () const |
get number of samples More... | |
void | attachTexture (GLenum _attachment, GLuint _texture, GLuint _level=0) |
attach a texture of arbitrary dimension (requires OpenGL 3.2) More... | |
void | attachTexture2D (GLenum _attachment, GLsizei _width, GLsizei _height, GLuint _internalFmt, GLenum _format, GLint _wrapMode=GL_CLAMP_TO_EDGE, GLint _minFilter=GL_NEAREST, GLint _magFilter=GL_NEAREST) |
function to attach a texture to fbo More... | |
void | attachTexture2D (GLenum _attachment, GLuint _texture, GLenum _target=GL_TEXTURE_2D) |
function to attach a texture to fbo More... | |
void | attachTexture2DDepth (GLsizei _width, GLsizei _height, GLuint _internalFmt=GL_DEPTH_COMPONENT32, GLenum _format=GL_DEPTH_COMPONENT) |
function to attach a depth-buffer texture to fbo (using GL_DEPTH_ATTACHMENT) More... | |
void | attachTexture2DStencil (GLsizei _width, GLsizei _height) |
function to attach a stencil-buffer texture to fbo (texformat = GL_STENCIL_INDEX8) More... | |
void | attachTexture3D (GLenum _attachment, GLsizei _width, GLsizei _height, GLsizei _depth, GLuint _internalFmt, GLenum _format, GLint _wrapMode=GL_CLAMP, GLint _minFilter=GL_NEAREST, GLint _magFilter=GL_NEAREST) |
void | addDepthBuffer (GLuint _width, GLuint _height) |
function to add a depth renderbuffer to the fbo More... | |
void | addStencilBuffer (GLuint _width, GLuint _height) |
function to add a stencil renderbuffer to the fbo More... | |
void | addDepthStencilBuffer (GLuint _width, GLuint _height) |
add a packed depth24_stencil8 renderbuffer More... | |
GLuint | getAttachment (GLenum _attachment) |
return attached texture id More... | |
GLuint | getInternalFormat (GLenum _attachment) |
return internal texture format of attachment More... | |
GLuint | getFboID () |
return opengl id More... | |
void | resize (GLsizei _width, GLsizei _height, bool _forceResize=false) |
resize function (if textures created by this class) More... | |
GLsizei | width () const |
get width of fbo texture More... | |
GLsizei | height () const |
get height of fbo texture More... | |
ACG::Vec2i | size () const |
get width and height of fbo texture More... | |
bool | bind () |
bind the fbo and sets it as rendertarget More... | |
void | unbind () |
unbind fbo, go to normal rendering mode More... | |
bool | checkFramebufferStatus () |
function to check the framebuffer status More... | |
Private Types | |
typedef std::map< GLenum, RenderTexture > | AttachmentList |
Private Attributes | |
GLuint | fbo_ |
handle of frame buffer object More... | |
GLuint | depthbuffer_ |
depthbuffer More... | |
GLuint | stencilbuffer_ |
stencilbuffer More... | |
AttachmentList | attachments_ |
GLsizei | width_ |
width and height of render textures More... | |
GLsizei | height_ |
GLsizei | samples_ |
sample count if multisampling More... | |
GLboolean | fixedsamplelocation_ |
enable fixed sample location if multisampling More... | |
GLuint | prevFbo_ |
handle of previously bound fbo More... | |
GLuint | prevDrawBuffer_ |
/.../FBO.hh>
Brief Description.
A more elaborate description follows.
|
private |
void ACG::FBO::addDepthBuffer | ( | GLuint | _width, |
GLuint | _height | ||
) |
void ACG::FBO::addDepthStencilBuffer | ( | GLuint | _width, |
GLuint | _height | ||
) |
void ACG::FBO::addStencilBuffer | ( | GLuint | _width, |
GLuint | _height | ||
) |
void ACG::FBO::attachTexture | ( | GLenum | _attachment, |
GLuint | _texture, | ||
GLuint | _level = 0 |
||
) |
void ACG::FBO::attachTexture2D | ( | GLenum | _attachment, |
GLsizei | _width, | ||
GLsizei | _height, | ||
GLuint | _internalFmt, | ||
GLenum | _format, | ||
GLint | _wrapMode = GL_CLAMP_TO_EDGE , |
||
GLint | _minFilter = GL_NEAREST , |
||
GLint | _magFilter = GL_NEAREST |
||
) |
void ACG::FBO::attachTexture2D | ( | GLenum | _attachment, |
GLuint | _texture, | ||
GLenum | _target = GL_TEXTURE_2D |
||
) |
void ACG::FBO::attachTexture2DDepth | ( | GLsizei | _width, |
GLsizei | _height, | ||
GLuint | _internalFmt = GL_DEPTH_COMPONENT32 , |
||
GLenum | _format = GL_DEPTH_COMPONENT |
||
) |
void ACG::FBO::attachTexture2DStencil | ( | GLsizei | _width, |
GLsizei | _height | ||
) |
void ACG::FBO::attachTexture3D | ( | GLenum | _attachment, |
GLsizei | _width, | ||
GLsizei | _height, | ||
GLsizei | _depth, | ||
GLuint | _internalFmt, | ||
GLenum | _format, | ||
GLint | _wrapMode = GL_CLAMP , |
||
GLint | _minFilter = GL_NEAREST , |
||
GLint | _magFilter = GL_NEAREST |
||
) |
bool ACG::FBO::bind | ( | ) |
bool ACG::FBO::checkFramebufferStatus | ( | ) |
void ACG::FBO::del | ( | ) |
GLuint ACG::FBO::getAttachment | ( | GLenum | _attachment | ) |
GLuint ACG::FBO::getInternalFormat | ( | GLenum | _attachment | ) |
|
inline |
|
inline |
void ACG::FBO::init | ( | ) |
void ACG::FBO::resize | ( | GLsizei | _width, |
GLsizei | _height, | ||
bool | _forceResize = false |
||
) |
GLsizei ACG::FBO::setMultisampling | ( | GLsizei | _samples, |
GLboolean | _fixedsamplelocations = GL_TRUE |
||
) |
|
inline |
void ACG::FBO::unbind | ( | ) |
|
inline |
|
private |
|
private |
|
private |
|
private |