// =======================================================================
OpenGl_Workspace::OpenGl_Workspace (OpenGl_View* theView, const Handle(OpenGl_Window)& theWindow)
: NamedStatus (0),
- HighlightColor (&THE_WHITE_COLOR),
myView (theView),
myWindow (theWindow),
myGlContext (!theWindow.IsNull() ? theWindow->GetGlContext() : NULL),
ViewMatrix_applied (&myDefaultMatrix),
StructureMatrix_applied (&myDefaultMatrix),
myToAllowFaceCulling (false),
- myToHighlight (false),
myModelViewMatrix (myDefaultMatrix)
{
if (!myGlContext.IsNull() && myGlContext->MakeCurrent())
myGlContext->BindDefaultVao();
NamedStatus = !myTextureBound.IsNull() ? OPENGL_NS_TEXTURE : 0;
- HighlightColor = &THE_WHITE_COLOR;
+ myHighlightStyle.Nullify();
myToAllowFaceCulling = false;
myAspectLineSet = &myDefaultAspectLine;
myAspectFaceSet = &myDefaultAspectFace;
}
myMatTmp.Init (*aSrcMat, *aSrcIntColor);
- if (myToHighlight)
+ if (!myHighlightStyle.IsNull())
{
- myMatTmp.SetColor (*HighlightColor);
+ myMatTmp.SetColor (myHighlightStyle->ColorRGBA());
}
// handling transparency
}
if (myAspectFaceSet->Aspect() == myAspectFaceApplied
- && myToHighlight == myAspectFaceAppliedWithHL)
+ && !myHighlightStyle.IsNull() == myAspectFaceAppliedWithHL)
{
return myAspectFaceSet;
}
- myAspectFaceAppliedWithHL = myToHighlight;
+ myAspectFaceAppliedWithHL = !myHighlightStyle.IsNull();
#if !defined(GL_ES_VERSION_2_0)
const Aspect_InteriorStyle anIntstyle = myAspectFaceSet->Aspect()->InteriorStyle();