mirror of
https://github.com/lubosz/overte.git
synced 2025-04-18 13:57:42 +02:00
Merge pull request #8266 from jherico/texture_free_fix
Actually delete textures we're not using
This commit is contained in:
commit
455d890358
1 changed files with 5 additions and 1 deletions
|
@ -187,7 +187,11 @@ GLTexture::~GLTexture() {
|
|||
}
|
||||
}
|
||||
|
||||
Backend::decrementTextureGPUCount();
|
||||
if (_id) {
|
||||
glDeleteTextures(1, &_id);
|
||||
const_cast<GLuint&>(_id) = 0;
|
||||
Backend::decrementTextureGPUCount();
|
||||
}
|
||||
Backend::updateTextureGPUMemoryUsage(_size, 0);
|
||||
Backend::updateTextureGPUVirtualMemoryUsage(_virtualSize, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue