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:
parent
1970bf81e5
commit
602d3034a9
1 changed files with 3 additions and 0 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue