Gui: [skip ci] add options to set one-pass and backface-pass rendering
This commit is contained in:
@@ -189,6 +189,7 @@ View3DInventor::View3DInventor(Gui::Document* pcDocument, QWidget* parent,
|
||||
OnChange(*hGrp,"Dimensions3dVisible");
|
||||
OnChange(*hGrp,"DimensionsDeltaVisible");
|
||||
OnChange(*hGrp,"PickRadius");
|
||||
OnChange(*hGrp,"TransparentObjectRenderType");
|
||||
|
||||
stopSpinTimer = new QTimer(this);
|
||||
connect(stopSpinTimer, SIGNAL(timeout()), this, SLOT(stopAnimating()));
|
||||
@@ -414,6 +415,17 @@ void View3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
|
||||
else if (strcmp(Reason, "PickRadius") == 0) {
|
||||
_viewer->setPickRadius(rGrp.GetFloat("PickRadius", 5.0f));
|
||||
}
|
||||
else if (strcmp(Reason, "TransparentObjectRenderType") == 0) {
|
||||
long renderType = rGrp.GetInt("TransparentObjectRenderType", 0);
|
||||
if (renderType == 0) {
|
||||
_viewer->getSoRenderManager()->getGLRenderAction()
|
||||
->setTransparentDelayedObjectRenderType(SoGLRenderAction::ONE_PASS);
|
||||
}
|
||||
else if (renderType == 1) {
|
||||
_viewer->getSoRenderManager()->getGLRenderAction()
|
||||
->setTransparentDelayedObjectRenderType(SoGLRenderAction::NONSOLID_SEPARATE_BACKFACE_PASS);
|
||||
}
|
||||
}
|
||||
else {
|
||||
unsigned long col1 = rGrp.GetUnsigned("BackgroundColor",3940932863UL);
|
||||
unsigned long col2 = rGrp.GetUnsigned("BackgroundColor2",859006463UL); // default color (dark blue)
|
||||
|
||||
Reference in New Issue
Block a user