1
0
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:
kgv
2016-06-20 09:51:56 +03:00
committed by bugmaster
parent 2831708b17
commit f9ba5c4ddd
19 changed files with 297 additions and 216 deletions

View File

@@ -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());
}