mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0027617: Visualization, TKOpenGl - apply highlighting color without disabling lighting
Update colors in test cases
This commit is contained in:
@@ -2514,7 +2514,8 @@ Handle(OpenGl_FrameBuffer) OpenGl_Context::SetDefaultFrameBuffer (const Handle(O
|
||||
// function : SetShadingMaterial
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void OpenGl_Context::SetShadingMaterial (const OpenGl_AspectFace* theAspect)
|
||||
void OpenGl_Context::SetShadingMaterial (const OpenGl_AspectFace* theAspect,
|
||||
const OpenGl_Vec4* theHighlightColor)
|
||||
{
|
||||
if (!myActiveProgram.IsNull())
|
||||
{
|
||||
@@ -2541,6 +2542,12 @@ void OpenGl_Context::SetShadingMaterial (const OpenGl_AspectFace* theAspect)
|
||||
: theAspect->IntBack();
|
||||
aParams.Init (aProp);
|
||||
aParams.Diffuse.a() = aProp.trans;
|
||||
|
||||
if (theHighlightColor != NULL)
|
||||
{
|
||||
aParams.SetColor (*theHighlightColor);
|
||||
}
|
||||
|
||||
myActiveProgram->SetUniform (this, aLoc, OpenGl_Material::NbOfVec4(),
|
||||
aParams.Packed());
|
||||
}
|
||||
|
Reference in New Issue
Block a user