i’ve got a serious problem with a glReadPixels call that causes a Memory Leak.
glReadPixels(0,0,width, height, GL_RGB, GL_UNSIGNED_BYTE, gpuReadBackBuffer);
The gpuReadBackBuffer size is : gpuReadBackBuffer = new unsigned char[(width*height)];
I’m trying to make an Offscreen Rendering on every update() and grab the Screen to an ofImage .
So i write the data into an Image:
gpuReadBackImageGS.setFromPixels(gpuReadBackBuffer, width, height);
, where gpuReadBackImageGS a ofxCvColorImage is.
So i make some OpenGL drawing calls and then grab the screen. My frst attempt with an FBO ended with the memory-problem at the glReadPixels call, so i switched to another solution with GrabScreen(), but realized that internaly a glReadPixels call is made, so i’ve got the same problems.
Has sombody else some advices i have to concern with. The issue seems an ATI problem, as on NVIDIA Cards there are no Memory problems.
I’m getting nuts with this and find no approach. I can’t imagine that offscreen rendering on ATI Cards are so buggy.
edit: a friend of mine told me that he has the problem with the newest Catalyst driver 9.12 and the Memory Leak disappeard when he switched back to 9.4 . :roll: