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
This commit is contained in:
Abdullah Tahiri
2018-12-09 12:14:55 +01:00
committed by Yorik van Havre
parent d0767359ad
commit 8fabcc8d75

View File

@@ -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);