Gui: fix screenshot

This commit is contained in:
Zheng, Lei
2020-01-10 10:10:23 +08:00
committed by wmayer
parent a46e3b3734
commit 20c85d9cc4
2 changed files with 10 additions and 1 deletions

View File

@@ -2022,7 +2022,7 @@ QImage View3DInventorViewer::grabFramebuffer()
int w = gl->width();
int h = gl->height();
QImage img(QSize(w,h), QImage::Format_RGB32);
glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
glReadPixels(0, 0, w, h, GL_BGRA, GL_UNSIGNED_BYTE, img.bits());
res = img;
#else
const SbViewportRegion vp = this->getSoRenderManager()->getViewportRegion();