Fix: [OpenGL] Main loop expects to start with the video buffer unmapped. (#9100)

This commit is contained in:
Michael Lutz
2021-04-25 00:43:38 +02:00
committed by GitHub
parent fbc232569c
commit f4d5c8d99e
3 changed files with 5 additions and 0 deletions

View File

@@ -1154,6 +1154,7 @@ void *OpenGLBackend::GetVideoBuffer()
#endif
if (!this->persistent_mapping_supported) {
assert(this->vid_buffer == nullptr);
_glBindBuffer(GL_PIXEL_UNPACK_BUFFER, this->vid_pbo);
this->vid_buffer = _glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_READ_WRITE);
} else if (this->vid_buffer == nullptr) {