enable anti-aliasing for Coin's offscreen renderer

This commit is contained in:
wmayer
2017-12-23 18:59:27 +01:00
parent 6d999a98de
commit aa353569b3

View File

@@ -1022,6 +1022,8 @@ void View3DInventorViewer::savePicture(int w, int h, const QColor& bg, QImage& i
else {
SoFCOffscreenRenderer& renderer = SoFCOffscreenRenderer::instance();
renderer.setViewportRegion(vp);
renderer.getGLRenderAction()->setSmoothing(true);
renderer.getGLRenderAction()->setNumPasses(4);
if (bgColor.isValid())
renderer.setBackgroundColor(SbColor(bgColor.redF(), bgColor.greenF(), bgColor.blueF()));
if (!renderer.render(root))