diff options
| author | Stenzek <stenzek@users.noreply.github.com> | 2018-02-09 13:28:28 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-09 13:28:28 +1000 |
| commit | fa91d74e2c97f54049649d53143fea173ad4db4a (patch) | |
| tree | a3450d72443227ed7a7c3592a10bedbc8c043b0b /Source | |
| parent | c30ac55cf4c06cf896f0264443dfa3d5de904e69 (diff) | |
| parent | 4b96db8fc9e8005221d46de5fcf2a603afef7d05 (diff) | |
Merge pull request #6366 from stenzek/gl-buffer-binding
OGL: Don't leave staging texture buffer bound after mapping
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/OGLTexture.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLTexture.cpp b/Source/Core/VideoBackends/OGL/OGLTexture.cpp index 89b6436f2b..bc93c37dd4 100644 --- a/Source/Core/VideoBackends/OGL/OGLTexture.cpp +++ b/Source/Core/VideoBackends/OGL/OGLTexture.cpp @@ -511,10 +511,8 @@ bool OGLStagingTexture::Map() flags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT; glBindBuffer(m_target, m_buffer_name); m_map_pointer = reinterpret_cast<char*>(glMapBufferRange(m_target, 0, m_buffer_size, flags)); - if (!m_map_pointer) - return false; - - return true; + glBindBuffer(m_target, 0); + return m_map_pointer != nullptr; } void OGLStagingTexture::Unmap() |
