Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
glBindTexture(GL_TEXTURE_2D, 0);

glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboId);
//glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

glAssert(); // <= crashes here

If I uncomment the line //glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); it works, how come?

share|improve this question
up vote 1 down vote accepted

I would suppose the FBO manages some of its own state (there are some pushed/popped states whose values depend on the framebuffer binding) and it gets somehow messed up when you pop these and the framebuffer has suddenly changed. Maybe it's a driver fault where they didn't integrate the FBOs correctly with the rare case of intermediate state pushes/pops (which are quite old and deprecated anyway).

But don't use glPush/glPopAttrib anyway, it's quite slow, as you surely don't need to push every state. Don't do that just out of laziness.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.