diff --git a/src/Gui/SoFCOffscreenRenderer.cpp b/src/Gui/SoFCOffscreenRenderer.cpp index 5f88ee57fe..8232bcc1de 100644 --- a/src/Gui/SoFCOffscreenRenderer.cpp +++ b/src/Gui/SoFCOffscreenRenderer.cpp @@ -589,6 +589,8 @@ SoQtOffscreenRenderer::makeFrameBuffer(int width, int height, int samples) fmt.setAttachment(QtGLFramebufferObject::Depth); #if defined(HAVE_QT5_OPENGL) fmt.setInternalTextureFormat(GL_RGB32F_ARB); +#else + fmt.setInternalTextureFormat(GL_RGB); #endif #else QtGLFramebufferObject::Attachment fmt; diff --git a/src/Gui/Thumbnail.cpp b/src/Gui/Thumbnail.cpp index 7b038ee590..3626dd8ff5 100644 --- a/src/Gui/Thumbnail.cpp +++ b/src/Gui/Thumbnail.cpp @@ -136,14 +136,15 @@ void Thumbnail::createThumbnailFromFramebuffer(QImage& img) const // Alternative way of off-screen rendering if (this->viewer->isActiveWindow()) { static_cast(this->viewer->getGLWidget())->makeCurrent(); -#if defined(HAVE_QT5_OPENGL) + QtGLFramebufferObjectFormat format; format.setAttachment(QtGLFramebufferObject::Depth); +#if defined(HAVE_QT5_OPENGL) format.setInternalTextureFormat(GL_RGB32F_ARB); - QtGLFramebufferObject fbo(this->size, this->size, format); #else - QtGLFramebufferObject fbo(this->size, this->size, QtGLFramebufferObject::Depth); + format.setInternalTextureFormat(GL_RGB); #endif + QtGLFramebufferObject fbo(this->size, this->size, format); this->viewer->renderToFramebuffer(&fbo); img = fbo.toImage(); static_cast(this->viewer->getGLWidget())->doneCurrent(); diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp index 16b974a350..71a7c4f665 100644 --- a/src/Gui/View3DInventor.cpp +++ b/src/Gui/View3DInventor.cpp @@ -588,6 +588,8 @@ void View3DInventor::previewFromFramebuffer(const QRect& rect, QImage& img) format.setAttachment(QtGLFramebufferObject::Depth); #if defined(HAVE_QT5_OPENGL) format.setInternalTextureFormat(GL_RGB32F_ARB); +#else + format.setInternalTextureFormat(GL_RGB); #endif QtGLFramebufferObject fbo(rect.width(), rect.height(), format); #else diff --git a/src/Gui/View3DPy.cpp b/src/Gui/View3DPy.cpp index 057371fbfc..f10ebffe93 100644 --- a/src/Gui/View3DPy.cpp +++ b/src/Gui/View3DPy.cpp @@ -710,6 +710,8 @@ void View3DInventorPy::createImageFromFramebuffer(int width, int height, const Q format.setAttachment(QtGLFramebufferObject::Depth); #if defined(HAVE_QT5_OPENGL) format.setInternalTextureFormat(GL_RGB32F_ARB); +#else + format.setInternalTextureFormat(GL_RGB); #endif QtGLFramebufferObject fbo(width, height, format); #else