mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:21:24 +02:00
INtroduce a safe destruction of the TBO defined when using a gpu::Buffer as REsourceBuffer in gl41 backend
This commit is contained in:
parent
680f5f5703
commit
da6e399161
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,10 @@ namespace gpu {
|
||||||
|
|
||||||
~GL41Buffer() {
|
~GL41Buffer() {
|
||||||
if (_texBuffer) {
|
if (_texBuffer) {
|
||||||
glDeleteTextures(1, &_texBuffer);
|
auto backend = _backend.lock();
|
||||||
|
if (backend) {
|
||||||
|
backend->releaseTexture(_texBuffer, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue