mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-12 13:36:48 +03:00
Merge pull request #6366 from stenzek/gl-buffer-binding
OGL: Don't leave staging texture buffer bound after mapping
This commit is contained in:
commit
fa91d74e2c
1 changed files with 2 additions and 4 deletions
|
@ -511,10 +511,8 @@ bool OGLStagingTexture::Map()
|
||||||
flags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
|
flags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
|
||||||
glBindBuffer(m_target, m_buffer_name);
|
glBindBuffer(m_target, m_buffer_name);
|
||||||
m_map_pointer = reinterpret_cast<char*>(glMapBufferRange(m_target, 0, m_buffer_size, flags));
|
m_map_pointer = reinterpret_cast<char*>(glMapBufferRange(m_target, 0, m_buffer_size, flags));
|
||||||
if (!m_map_pointer)
|
glBindBuffer(m_target, 0);
|
||||||
return false;
|
return m_map_pointer != nullptr;
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OGLStagingTexture::Unmap()
|
void OGLStagingTexture::Unmap()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue