65 #include <ACG/Config/ACGDefines.hh>
66 #include <ACG/GL/gl.hh>
83 class ACGDLLEXPORT
FBO
102 GLsizei setMultisampling(GLsizei _samples, GLboolean _fixedsamplelocations = GL_TRUE);
108 void attachTexture( GLenum _attachment,
113 void attachTexture2D( GLenum _attachment,
114 GLsizei _width, GLsizei _height,
115 GLuint _internalFmt, GLenum _format,
116 GLint _wrapMode = GL_CLAMP,
117 GLint _minFilter = GL_NEAREST,
118 GLint _magFilter = GL_NEAREST);
122 void attachTexture2D( GLenum _attachment, GLuint _texture, GLenum _target = GL_TEXTURE_2D );
125 void attachTexture2DDepth( GLsizei _width, GLsizei _height, GLuint _internalFmt = GL_DEPTH_COMPONENT32, GLenum _format = GL_DEPTH_COMPONENT );
128 void attachTexture2DStencil(GLsizei _width, GLsizei _height);
132 void attachTexture3D( GLenum _attachment,
133 GLsizei _width, GLsizei _height, GLsizei _depth,
134 GLuint _internalFmt, GLenum _format,
135 GLint _wrapMode = GL_CLAMP,
136 GLint _minFilter = GL_NEAREST,
137 GLint _magFilter = GL_NEAREST);
140 void addDepthBuffer( GLuint _width, GLuint _height );
143 void addStencilBuffer( GLuint _width, GLuint _height );
146 void addDepthStencilBuffer( GLuint _width, GLuint _height );
149 GLuint getAttachment( GLenum _attachment );
152 GLuint getInternalFormat( GLenum _attachment );
158 void resize(GLsizei _width, GLsizei _height,
bool _forceResize =
false);
161 GLsizei
width()
const {
return width_;}
176 bool checkFramebufferStatus();
200 GLenum internalFormat, format, gltype;
214 typedef std::map<GLenum, RenderTexture> AttachmentList;
215 AttachmentList attachments_;
230 GLuint prevDrawBuffer_;
237 #endif // ACG_FBO_HH defined
GLsizei width_
width and height of render textures
Namespace providing different geometric functions concerning angles.
VectorT< signed int, 2 > Vec2i
GLsizei samples_
sample count if multisampling
GLsizei width() const
get width of fbo texture
GLsizei getMultisamplingCount() const
get number of samples
GLuint fbo_
handle of frame buffer object
GLuint prevFbo_
handle of previously bound fbo
GLboolean fixedsamplelocation_
enable fixed sample location if multisampling
bool bind(osg::GeometryPtr &_geo, Mesh &_mesh)
GLuint stencilbuffer_
stencilbuffer
GLuint depthbuffer_
depthbuffer
GLsizei height() const
get height of fbo texture
ACG::Vec2i size() const
get width and height of fbo texture