+ support anti-aliasing in offscreen renderer

This commit is contained in:
wmayer
2014-11-10 14:10:38 +01:00
parent 9ed9925352
commit ce8b810ae0
5 changed files with 425 additions and 6 deletions

View File

@@ -658,10 +658,14 @@ Py::Object View3DInventorPy::isAnimationEnabled(const Py::Tuple& args)
void View3DInventorPy::createImageFromFramebuffer(int width, int height, const QColor& bgcolor, QImage& img)
{
#if QT_VERSION >= 0x040600
QGLFramebufferObjectFormat format;
format.setSamples(8);
format.setAttachment(QGLFramebufferObject::Depth);
QGLFramebufferObject fbo(width, height, format);
#else
QGLFramebufferObject fbo(width, height, QGLFramebufferObject::Depth);
#endif
const QColor col = _view->getViewer()->backgroundColor();
bool on = _view->getViewer()->hasGradientBackground();