I am using an RTT with OpenGl to render my scene. The game window can be set to random sizes via drag´n´drop. Whenever it resizes, I change the size of the texture this way:
Code: Select all
texture->freeInternalResources();
texture->setWidth(width);
texture->setHeight(height);
texture->createInternalResources();
So if I resize my window a few times, there is a huge amount of memory used by those DepthBuffers. There seems to be no difference, if I remove the texture completely and recreate it.
Am I missing some cleanup-call?
Furthermore if I work around this bug by setting the DepthBuffer manually, my app freezes after a few resizes during a call to an OpenGl-method. So there seem to be more memory issues, which I didnt have time yet to look into.
I am currently using Ogre 1.8, but there seem to have been no changes in 1.9 to OgreGLRenderSystem regarding DepthBuffers.
Thanks in advance.