X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FOpenGl%2FOpenGl_PrimitiveArray.cxx;h=593fe500e869d00a84f3ea9cdd70d39b37bea05d;hp=6a479237bf7df93b3a106f22f34563fe607c5c75;hb=6c6aadb1ffc7d249776e9c53f54a8bcef09a1c2a;hpb=abdf0b107ef8761a2c84fdff1ad8508aa3d792c6 diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index 6a479237bf..593fe500e8 100755 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -24,6 +24,7 @@ #include #include #include +#include namespace { @@ -796,7 +797,10 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace } default: { - aCtx->ShaderManager()->BindProgram (anAspectFace, theWorkspace->ActiveTexture(), isLightOn, hasVertColor, anAspectFace->ShaderProgramRes (aCtx)); + const Standard_Boolean isLightOnFace = isLightOn + && (theWorkspace->ActiveTexture().IsNull() + || theWorkspace->ActiveTexture()->GetParams()->IsModulate()); + aCtx->ShaderManager()->BindProgram (anAspectFace, theWorkspace->ActiveTexture(), isLightOnFace, hasVertColor, anAspectFace->ShaderProgramRes (aCtx)); break; } }