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