glBindFramebufferEXT leads to GL_OUT_OF_MEMORY


I am trying to run an operation on a texture. The code worked on my old computer but since I moved to a new one it’s stopped working. I used the glGetError function to try and establish when the problem was occuring. I found it happens when glBindFramebufferEXT is called:

GLuint fbo;
glGenFramebuffersEXT(1, &fbo);

GLenum err = glGetError();

glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);

err = glGetError();

At first err is equal to GL_NO_ERROR but after the call it is equal to GL_OUT_OF_MEMORY. Any ideas?

Thanks in advance.

More information is probably needed!

The code I posted is called directly after the initialisation process. I forgot to mention that I have used RivaTuner to track the memory usage and it shows that at the time of running the GPU is only using 2-3MB of memory, i.e. it is not out of memory. I am using a Nvidia GeForce 8600 GTS GPU. I have not yet created any textures, I am simply attempting to create an FBO (my first too) so that I can then create a texture and attach it to the FBO.

So I am confused as to why, before I have even run any operations, it says out of memory. Clearly it is not, but I don’t know whats wrong!

Thanks for any help.

Um, what’s a RivaTuner?

RivaTuner is a program that allows you to look at the memory on the GPU. Its live and shows it on a graph so you can see exactly what memory is being used when as you debug your code.

Cool, is it a freeware ?? (RivaTuner) …I also heard about gpuMemset80… how does it compare it to?

Ok, regarding your problem, sometimes an error from the previous location may reside and hence such an error can take place.

Just follow the specification(official one …khronos) where they give you a way of making sure that an error has occurred .

They suggest to check for error in a while loop … read it.

completely free. its ace, theres tonnes of other stuff in the programme but i use a real time graph of the GPU, so you can find out exactly what calls create memory on the GPU. i have heard that the GPU sometimes waits after a function call before completing the request, which I believe glFlush() sorts out, but other than that its extremely useful. i havn’t tried gpuMemset80. let us know if you can’t find the right option in RivaTuner.

incidently problem solved, i was calling glBindFramebufferEXT too early in the initialisation process.