1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Don't use glFlushMappedBufferRange in debug mode, the performance

penalty is too high
This commit is contained in:
fzurita 2019-11-29 11:55:57 -05:00
parent b31e510932
commit 6ac44db414

View File

@ -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);