From 1f3c2ef2c86b04e19ebdec0ff74cdc3f917affbe Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 24 Jul 2016 22:24:58 +0200 Subject: [PATCH] support transparent background when using renderToFramebuffer --- src/Gui/View3DInventorViewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 540966ba98..1ab5eec2de 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -1284,7 +1284,7 @@ void View3DInventorViewer::renderToFramebuffer(QGLFramebufferObject* fbo) const QColor col = this->backgroundColor(); glViewport(0, 0, width, height); - glClearColor(col.redF(), col.greenF(), col.blueF(), 1.0f); + glClearColor(col.redF(), col.greenF(), col.blueF(), col.alphaF()); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glDepthRange(0.1,1.0);