// function : GraphicHighlight
// purpose :
// =======================================================================
-void OpenGl_Structure::GraphicHighlight (const Handle(Graphic3d_HighlightStyle)& theStyle,
- const Handle(Graphic3d_Structure)& theStruct)
+void OpenGl_Structure::GraphicHighlight (const Handle(Graphic3d_PresentationAttributes)& theStyle,
+ const Handle(Graphic3d_Structure)& theStruct)
{
if (!myHighlightStyle.IsNull()
&& myHighlightStyle->Method() == Aspect_TOHM_BOUNDBOX
// Render named status
if (highlight && myHighlightBox.IsNull())
{
- theWorkspace->SetHighlight (true);
+ theWorkspace->SetHighlightStyle (myHighlightStyle);
}
// Apply local transformation
aCtx->core11fwd->glFrontFace (GL_CW);
}
- // Apply highlight color
- const OpenGl_Vec4* aHighlightColor = theWorkspace->HighlightColor;
- if (!myHighlightStyle.IsNull())
- theWorkspace->HighlightColor = myHighlightStyle->ColorFltPtr();
-
// Collect clipping planes of structure scope
aCtx->ChangeClipping().SetLocalPlanes (aCtx, myClipPlanes);
aCtx->WorldViewState.Pop();
}
- // Restore highlight color
- theWorkspace->HighlightColor = aHighlightColor;
-
// Restore aspects
theWorkspace->SetAspectLine (aPrevAspectLine);
theWorkspace->SetAspectFace (aPrevAspectFace);
// Apply highlight box
if (!myHighlightBox.IsNull())
{
+ theWorkspace->SetHighlightStyle (myHighlightStyle);
myHighlightBox->Render (theWorkspace);
}
// Restore named status
- theWorkspace->SetHighlight (false);
+ theWorkspace->SetHighlightStyle (Handle(Graphic3d_PresentationAttributes)());
}
// =======================================================================