diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 42374ed80a..13a9b46312 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -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(); diff --git a/src/Mod/Part/Gui/SoBrepFaceSet.cpp b/src/Mod/Part/Gui/SoBrepFaceSet.cpp index 441a9c695a..466094379b 100644 --- a/src/Mod/Part/Gui/SoBrepFaceSet.cpp +++ b/src/Mod/Part/Gui/SoBrepFaceSet.cpp @@ -617,6 +617,15 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action) // material override with transparncy won't work. mb.sendFirst(); + if(SoShapeStyleElement::get(state)->getFlags() + & (SoShapeStyleElement::TRANSP_TEXTURE|SoShapeStyleElement::TRANSP_MATERIAL)) + { + // For some reason, there is an inconsistence in blending state between + // OpenGL and Coin, especially when doing offscreen rendering. + if(!glIsEnabled(GL_BLEND)) + glEnable(GL_BLEND); + } + // When setting transparency shouldGLRender() handles the rendering and returns false. // Therefore generatePrimitives() needs to be re-implemented to handle the materials // correctly.