+ when creating picture check whether pbuffer is supported

This commit is contained in:
wmayer
2014-12-09 14:18:44 +01:00
parent 5da5be2eea
commit d4a5249b4b
3 changed files with 9 additions and 3 deletions

View File

@@ -29,6 +29,7 @@
# include <QColor>
# include <QImage>
# include <QGLFramebufferObject>
# include <QGLPixelBuffer>
# include <Inventor/SbViewVolume.h>
# include <Inventor/nodes/SoCamera.h>
#endif
@@ -696,8 +697,9 @@ Py::Object View3DInventorPy::saveImage(const Py::Tuple& args)
bg.setNamedColor(colname);
QImage img;
bool pbuffer = QGLPixelBuffer::hasOpenGLPbuffers();
if (App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Document")->GetBool("DisablePBuffers",false)) {
("User parameter:BaseApp/Preferences/Document")->GetBool("DisablePBuffers",!pbuffer)) {
createImageFromFramebuffer(w, h, bg, img);
}
else {