OPENGL: Release old texture name before creating a new one.

This prevents any texture name leaks (and thus memory leaks) on
recreateInternalTexture calls.
This commit is contained in:
Johannes Schickel 2014-02-11 11:07:37 +01:00
parent 1970bf81e5
commit 602d3034a9

View file

@ -65,6 +65,9 @@ void Texture::releaseInternalTexture() {
}
void Texture::recreateInternalTexture() {
// Release old texture name in case it exists.
releaseInternalTexture();
// Get a new texture name.
GLCALL(glGenTextures(1, &_glTexture));