From 4e63e11df6a150fca3f45063cc26e0c289bfc200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Sun, 28 Sep 2014 19:06:44 +0200 Subject: [PATCH] Make stereo modes work again Be aware that stereo rendering based on SoRenderManager does not allow background colors as the opengl buffers are cleared before rendering. As FreeCAD draws the background before the standart coin rendering the background gets erased again. --- src/Gui/View3DInventor.cpp | 10 +++++----- src/Gui/View3DPy.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp index 8d4a5db50..95649cb2d 100644 --- a/src/Gui/View3DInventor.cpp +++ b/src/Gui/View3DInventor.cpp @@ -566,23 +566,23 @@ bool View3DInventor::onMsg(const char* pMsg, const char** ppReturn) return true; } else if(strcmp("SetStereoRedGreen",pMsg) == 0 ) { - _viewer->setProperty("StereoMode", Quarter::SoQTQuarterAdaptor::ANAGLYPH); + _viewer->setStereoMode(Quarter::SoQTQuarterAdaptor::ANAGLYPH); return true; } else if(strcmp("SetStereoQuadBuff",pMsg) == 0 ) { - _viewer->setProperty("StereoMode", Quarter::SoQTQuarterAdaptor::QUAD_BUFFER ); + _viewer->setStereoMode(Quarter::SoQTQuarterAdaptor::QUAD_BUFFER ); return true; } else if(strcmp("SetStereoInterleavedRows",pMsg) == 0 ) { - _viewer->setProperty("StereoMode", Quarter::SoQTQuarterAdaptor::INTERLEAVED_ROWS ); + _viewer->setStereoMode(Quarter::SoQTQuarterAdaptor::INTERLEAVED_ROWS ); return true; } else if(strcmp("SetStereoInterleavedColumns",pMsg) == 0 ) { - _viewer->setProperty("StereoMode", Quarter::SoQTQuarterAdaptor::INTERLEAVED_COLUMNS ); + _viewer->setStereoMode(Quarter::SoQTQuarterAdaptor::INTERLEAVED_COLUMNS ); return true; } else if(strcmp("SetStereoOff",pMsg) == 0 ) { - _viewer->setProperty("StereoMode", Quarter::SoQTQuarterAdaptor::MONO ); + _viewer->setStereoMode(Quarter::SoQTQuarterAdaptor::MONO ); return true; } else if(strcmp("Example1",pMsg) == 0 ) { diff --git a/src/Gui/View3DPy.cpp b/src/Gui/View3DPy.cpp index dc4f93aad..c0d67134b 100644 --- a/src/Gui/View3DPy.cpp +++ b/src/Gui/View3DPy.cpp @@ -1046,7 +1046,7 @@ Py::Object View3DInventorPy::setStereoType(const Py::Tuple& args) if (stereomode < 0 || stereomode > 4) throw Py::Exception("Out of range"); Quarter::SoQTQuarterAdaptor::StereoMode mode = Quarter::SoQTQuarterAdaptor::StereoMode(stereomode); - _view->getViewer()->setProperty("StereoMode",mode); + _view->getViewer()->setStereoMode(mode); return Py::None(); } catch (const Base::Exception& e) {