Skip to content
Permalink
Browse files
Merge pull request #6366 from stenzek/gl-buffer-binding
OGL: Don't leave staging texture buffer bound after mapping
  • Loading branch information
stenzek committed Feb 9, 2018
2 parents c30ac55 + 4b96db8 commit fa91d74
Showing 1 changed file with 2 additions and 4 deletions.
@@ -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()

0 comments on commit fa91d74

Please sign in to comment.