simplify to define when to use which offscreen rendering method

This commit is contained in:
wmayer
2018-01-07 15:00:40 +01:00
parent f6ff4ed590
commit 8eaee314ac
3 changed files with 1 additions and 17 deletions

View File

@@ -927,14 +927,7 @@ void View3DInventorViewer::setSceneGraph(SoNode* root)
void View3DInventorViewer::savePicture(int w, int h, const QColor& bg, QImage& img) const
{
// If 'QGLPixelBuffer::hasOpenGLPbuffers()' returns false then
// SoQtOffscreenRenderer won't work. In this case we try to use
// Coin's implementation of the off-screen rendering.
#if !defined(HAVE_QT5_OPENGL)
bool useCoinOffscreenRenderer = !QGLPixelBuffer::hasOpenGLPbuffers();
#else
bool useCoinOffscreenRenderer = false;
#endif
useCoinOffscreenRenderer = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Document")->
GetBool("CoinOffscreenRenderer", useCoinOffscreenRenderer);