42 #ifndef UCDAVIS_FRAMEBUFFER_OBJECT_H 43 #define UCDAVIS_FRAMEBUFFER_OBJECT_H 46 #ifndef __gVirtualXRayConfig_h 120 GLenum attachment = GL_COLOR_ATTACHMENT0,
130 GLenum attachment[] = NULL,
131 int mipLevel[] = NULL,
132 int zSlice[] = NULL );
136 GLenum attachment = GL_COLOR_ATTACHMENT0);
143 GLenum attachment[] = NULL );
159 bool IsValid( std::ostream& ostr = std::cerr );
161 bool IsValid( std::ostream& ostr = std::cerr ) {
201 inline GLuint
getID()
const {
return m_fboId;}
207 GLuint texId,
int mipLevel,
int zSlice );
virtual void AttachRenderBuffers(int numBuffers, GLuint buffId[], GLenum attachment[]=NULL)
virtual void AttachTextures(int numTextures, GLenum texTarget[], GLuint texId[], GLenum attachment[]=NULL, int mipLevel[]=NULL, int zSlice[]=NULL)
GLint GetAttachedCubeFace(GLenum attachment)
Which cube face is currently attached to "attachment?".
GLenum GetAttachedType(GLenum attachment)
Is attached type GL_RENDERBUFFER_EXT or GL_TEXTURE?
FramebufferObject()
Ctor/Dtor.
static int GetMaxColorAttachments()
Which z-slice is currently attached to "attachment?".
GLuint GetAttachedId(GLenum attachment)
virtual void AttachRenderBuffer(GLuint buffId, GLenum attachment=GL_COLOR_ATTACHMENT0)
Bind a render buffer to the "attachment" point of this FBO.
static GLuint _GenerateFboId()
void _FramebufferTextureND(GLenum attachment, GLenum texTarget, GLuint texId, int mipLevel, int zSlice)
GLint GetAttachedMipLevel(GLenum attachment)
Which mipmap level is currently attached to "attachement?".
virtual ~FramebufferObject()
void Bind()
Bind this FBO as current render target.
GLuint getID() const
END : Static methods global to all FBOs.
bool IsValid(std::ostream &ostr=std::cerr)
virtual void AttachTexture(GLenum texTarget, GLuint texId, GLenum attachment=GL_COLOR_ATTACHMENT0, int mipLevel=0, int zSlice=0)
Bind a texture to the "attachment" point of this FBO.
void Unattach(GLenum attachment)
Free any resource bound to the "attachment" point of this FBO.
void UnattachAll()
Free any resources bound to any attachment points of this FBO.