Stack overflow with FBO
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!
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 );
if u want to use this FBO
then u use
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, framebufferID );
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?
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?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement