From 6ac44db414e8003bab44e480c9faec906a194d5d Mon Sep 17 00:00:00 2001 From: fzurita Date: Fri, 29 Nov 2019 11:55:57 -0500 Subject: [PATCH] Don't use glFlushMappedBufferRange in debug mode, the performance penalty is too high --- src/Graphics/OpenGLContext/opengl_BufferedDrawer.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Graphics/OpenGLContext/opengl_BufferedDrawer.cpp b/src/Graphics/OpenGLContext/opengl_BufferedDrawer.cpp index 5772a18e..e147cccf 100644 --- a/src/Graphics/OpenGLContext/opengl_BufferedDrawer.cpp +++ b/src/Graphics/OpenGLContext/opengl_BufferedDrawer.cpp @@ -82,10 +82,6 @@ void BufferedDrawer::_updateBuffer(Buffer & _buffer, u32 _count, u32 _dataSize, if (m_glInfo.bufferStorage) { memcpy(&_buffer.data[_buffer.offset], _data, _dataSize); -#ifdef GL_DEBUG - m_bindBuffer->bind(Parameter(_buffer.type), ObjectHandle(_buffer.handle)); - glFlushMappedBufferRange(_buffer.type, _buffer.offset, _dataSize); -#endif } else { m_bindBuffer->bind(Parameter(_buffer.type), ObjectHandle(_buffer.handle)); void* buffer_pointer = glMapBufferRange(_buffer.type, _buffer.offset, _dataSize, GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT);