PDA

View Full Version : QOpenGLTexture destructor



kangaba
28th November 2013, 12:52
Hi,
Does the QOpenGLTexture destructor call glDeleteTextures() or do I have to do it manually?
The docs don't mention this.


Using Qt 5.2 daily build.

saman_artorious
28th November 2013, 21:24
Hi,
Does the QOpenGLTexture destructor call glDeleteTextures() or do I have to do it manually?
The docs don't mention this.


Using Qt 5.2 daily build.

I always delete the previously made texture and replace it with the construction of the new one. This way I am sure excessive texture descriptor generations would not occupy memory which may also lead to program termination.
About QOpenGLTexture, it should normally call do clean-up operations before exiting.

kangaba
29th November 2013, 10:41
Thanks,
I looked at the source code, QOpenGLTexture is backed up by like 7 source code files in a labyrinth of interdependencies and private functionality and cache which would take hours to figure out, if at all, how it really works. Seems overengineered to me. I'll keep calling glDeleteTextures() by hand.