[skip ci] line width must be explicitly set in NaviCube and SoFCSelectionRoot to avoid that an inappropriate value is used when set from somewhere else

This commit is contained in:
wmayer
2019-11-10 11:13:10 +01:00
parent 116c868d9e
commit 08b54bb5a0
2 changed files with 5 additions and 3 deletions

View File

@@ -854,6 +854,7 @@ void NaviCubeImplementation::drawNaviCube(bool pickMode) {
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glLineWidth(2.0);
glDisable(GL_LIGHTING);
//glDisable(GL_BLEND);

View File

@@ -32,7 +32,6 @@
#include <Inventor/elements/SoOverrideElement.h>
#include <Inventor/elements/SoLazyElement.h>
#include <Inventor/elements/SoCacheElement.h>
#include <Inventor/elements/SoOverrideElement.h>
#include <Inventor/elements/SoWindowElement.h>
#include <Inventor/SoFullPath.h>
@@ -45,6 +44,7 @@
#include <Inventor/elements/SoElements.h>
#include <Inventor/elements/SoFontNameElement.h>
#include <Inventor/elements/SoFontSizeElement.h>
#include <Inventor/elements/SoLineWidthElement.h>
#include <Inventor/elements/SoMaterialBindingElement.h>
#include <Inventor/elements/SoModelMatrixElement.h>
#include <Inventor/elements/SoShapeStyleElement.h>
@@ -1231,8 +1231,9 @@ bool SoFCSelectionRoot::renderBBox(SoGLRenderAction *action, SoNode *node, SbCol
SoMaterialBindingElement::set(state,SoMaterialBindingElement::OVERALL);
SoLazyElement::setEmissive(state, &color);
SoLazyElement::setDiffuse(state, node,1, &color,data->packer);
SoDrawStyleElement::set(state,node,SoDrawStyleElement::LINES);
SoLazyElement::setDiffuse(state, node,1, &color, data->packer);
SoDrawStyleElement::set(state, node, SoDrawStyleElement::LINES);
SoLineWidthElement::set(state, node, 1.0f);
const static float trans = 0.0;
SoLazyElement::setTransparency(state, node, 1, &trans, data->packer);