mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-03 22:53:10 +02:00
Fix GPU buffer memory statistics
This commit is contained in:
parent
9509e32928
commit
e8bd97c761
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,6 @@ GLBackend::GLBuffer::GLBuffer(const Buffer& buffer, GLBuffer* original) :
|
|||
_size((GLuint)buffer._sysmem.getSize()),
|
||||
_stamp(buffer._sysmem.getStamp()),
|
||||
_gpuBuffer(buffer) {
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _buffer);
|
||||
if (GLEW_VERSION_4_4 || GLEW_ARB_buffer_storage) {
|
||||
glBufferStorage(GL_ARRAY_BUFFER, _size, nullptr, GL_DYNAMIC_STORAGE_BIT);
|
||||
|
@ -46,6 +45,7 @@ GLBackend::GLBuffer::GLBuffer(const Buffer& buffer, GLBuffer* original) :
|
|||
|
||||
Backend::setGPUObject(buffer, this);
|
||||
Backend::incrementBufferGPUCount();
|
||||
Backend::updateBufferGPUMemoryUsage(0, _size);
|
||||
}
|
||||
|
||||
GLBackend::GLBuffer::~GLBuffer() {
|
||||
|
|
Loading…
Reference in a new issue