CS 5620: Advanced Interactive Graphics (Fall 2009)
Instructor: Kavita Bala
FAQ for Programming Assignment 3
protected void bindFBO(GL gl) {
gl.glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, fboId);
gl.glPushAttrib(GL.GL_VIEWPORT);
gl.glViewport(0, 0, width, height);
if (fboType == DEPTH_TEXTURE_FBO) {
// Need to remind the FBO that it shouldn't draw or read from the color buffer
// since it isn't attached. Ran into this problem on a Radeon 2400 XT.
// This contradicts ATI's documentation on FBOs here:
// http://developer.amd.com/media/gpu_assets/FramebufferObjects.pdf
// It claims: "Note that this is a per-FBO state, so if you’re using
// separate FBOs for each render-to-texture setup, you can make these
// calls once at setup and forget it."
gl.glDrawBuffer(GL.GL_NONE);
gl.glReadBuffer(GL.GL_NONE);
}
}
Page maintained by Shuang Zhao.