PDA

View Full Version : FBO problem: error 1286



tomb4
12-15-2006, 12:32 AM
Hi all,
I had a problem using FBO to do some calculations updating a render texture, while using the texture itself as input in the FP using Cg. I used a temp RT texture as the output, and after rendering, copy it back to the original. The code is like the following:

glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, m_fbo );
glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_writeTo, 0 );

...//render

glBindTexture (GL_TEXTURE_2D, m_writeTo);
glCopyTexSubImage2D(m_copyBackTo, 0, 0, 0, 0, 0, m_width, m_height);
int err = glGetError(); Then I got error code 1286, which means frame buffer not complete. So how can I handle this?