diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp index b63c2e3d5..012eb53e3 100644 --- a/src/Gui/View3DInventor.cpp +++ b/src/Gui/View3DInventor.cpp @@ -554,7 +554,14 @@ void View3DInventor::print(QPrinter* printer) void View3DInventor::previewFromFramebuffer(const QRect& rect, QImage& img) { +#if QT_VERSION >= 0x040600 + QGLFramebufferObjectFormat format; + format.setSamples(8); + format.setAttachment(QGLFramebufferObject::Depth); + QGLFramebufferObject fbo(rect.width(), rect.height(), format); +#else QGLFramebufferObject fbo(rect.width(), rect.height(), QGLFramebufferObject::Depth); +#endif const QColor col = _viewer->backgroundColor(); bool on = _viewer->hasGradientBackground(); _viewer->setBackgroundColor(QColor(255,255,255));