From 8fabcc8d752347a618a39622bedcdc8208bdbba2 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Sun, 9 Dec 2018 12:14:55 +0100 Subject: [PATCH] Thumbnail generation ==================== Dynamically check whether to apply the fix for thumbnail generation. Some QT5 version seem to be affected. This problem appears in some linux distributions with some window managers. You may check/activate this fix: >>> hgrp = App.ParamGet("User parameter:BaseApp/Preferences/Document") >>> hgrp.GetBool("SaveThumbnailFix") False >>> hgrp.SetBool("SaveThumbnailFix",True) >>> hgrp.GetBool("SaveThumbnailFix") True --- src/Gui/View3DInventorViewer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 3a74c33725..e62bf4c2d8 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -1517,8 +1517,13 @@ void View3DInventorViewer::imageFromFramebuffer(int width, int height, int sampl // format and in the output image search for the above color and // replaces it with the color requested by the user. #if defined(HAVE_QT5_OPENGL) - //fboFormat.setInternalTextureFormat(GL_RGBA32F_ARB); - fboFormat.setInternalTextureFormat(GL_RGB32F_ARB); + if (App::GetApplication().GetParameterGroupByPath + ("User parameter:BaseApp/Preferences/Document")->GetBool("SaveThumbnailFix",false)) { + fboFormat.setInternalTextureFormat(GL_RGBA32F_ARB); + } + else { + fboFormat.setInternalTextureFormat(GL_RGB32F_ARB); + } #else //fboFormat.setInternalTextureFormat(GL_RGBA); fboFormat.setInternalTextureFormat(GL_RGB);