Jump to content
  • Advertisement
Sign in to follow this  
jasonyang

OpenGL Stack overflow with FBO

This topic is 4024 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sorry to bother you guys with my question. I'm using FBO to generate render target. The render target is a GL_TEXTURE_RECTANGLE_ARB texture. At first everything seems just OK. But after couples of iterations, FBO reports stack overflow error. It seems FBO keeps consuming the graphics memory till "out of memory" OpenGL error takes place. I traced the code, and found out that stack overflow error happens when I attache a texture to the FBO (error on :glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_ARB, tex, 0);). So what's the possible reason for this issue? Can someone give me a hint or a direction for the problem. Thank you guys so much!

Share this post


Link to post
Share on other sites
Advertisement
u only do this once, ie when u create a FBO
if u want to use this FBO

then u use
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, framebufferID );

Share this post


Link to post
Share on other sites
not necessarily(e.g.: sampling a cube map with the same fbo), stack overflows are usually caused by glPush* operations.
The error output may be delayed to the line where you attach the textures to the fbo, since you usually check the fbo state before proceeding with rendering to the fbo.

a) check for glPush(Matrix,Attribute,...) operations
b) do you unbind VBOs?
c) do you unbind FBOs?

Can you print the error message please?

Share this post


Link to post
Share on other sites
Thank you for your guys reply.

Basiror is right, I have a glPushMatrix and glPopMatrix mismatch in my code, which is not quite obvious before. Really rookie mistake.

Thank you again for your kindly help.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!