Skip to content

Commit

Permalink
Make stereo modes work again
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ickby authored and wwmayer committed Sep 29, 2014
1 parent ac010de commit 4e63e11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Gui/View3DInventor.cpp
Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/View3DPy.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 4e63e11

Please sign in to comment.