toplevelexport: fix missing GL_READ_FRAMEBUFFER set in shm copy

ref #4165
This commit is contained in:
Vaxry 2023-12-15 21:04:34 +00:00
parent e1ed8e11ca
commit 4e5d9b90c0
1 changed files with 4 additions and 0 deletions

View File

@ -400,6 +400,10 @@ bool CToplevelExportProtocolManager::copyFrameShm(SScreencopyFrame* frame, times
outFB.bind();
#ifndef GLES2
glBindFramebuffer(GL_READ_FRAMEBUFFER, outFB.m_iFb);
#endif
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(0, 0, frame->box.width, frame->box.height, PFORMAT->glFormat, PFORMAT->glType, data);