Qt5OpenGL: make off-screen renderer working

This commit is contained in:
wmayer
2017-03-12 18:22:36 +01:00
parent 67f05c98fa
commit 34f277e7bb
6 changed files with 59 additions and 14 deletions

View File

@@ -586,6 +586,9 @@ void View3DInventor::previewFromFramebuffer(const QRect& rect, QImage& img)
QtGLFramebufferObjectFormat format;
format.setSamples(8);
format.setAttachment(QtGLFramebufferObject::Depth);
#if defined(HAVE_QT5_OPENGL)
format.setInternalTextureFormat(GL_RGB32F_ARB);
#endif
QtGLFramebufferObject fbo(rect.width(), rect.height(), format);
#else
QtGLFramebufferObject fbo(rect.width(), rect.height(), QtGLFramebufferObject::Depth);