]> OCCT Git - occt.git/commit
0032042: Visualization, TKOpenGl - pre-multiply headlight flag into light source...
authorkgv <kgv@opencascade.com>
Thu, 7 Jan 2021 21:48:29 +0000 (00:48 +0300)
committerbugmaster <bugmaster@opencascade.com>
Tue, 12 Jan 2021 13:41:38 +0000 (16:41 +0300)
commit37f80e163c6651a5905c91f7e8c84e7dbdeac303
tree32eb17b48f72b93f5ab5869917341904ca43516f
parent0f26ed547610df5ebf2a127b9c6dfbc7489064c4
0032042: Visualization, TKOpenGl - pre-multiply headlight flag into light source position

OpenGl_ShaderManager::pushLightSourceState() now pre-multiplies headlight transformation.
Built-in shading GLSL programs have been updated to remove special handling if headlight flag;
also removed redundant pre-normalization of light source direction
(already normalized implicitly by Graphic3d_CLight interface).

Graphic3d_CLight::SetHeadlight() now raises exception in case of ambient light type.
OpenGl_ShaderManager::SetLastView() - removed unused property.
src/Graphic3d/Graphic3d_CLight.cxx
src/Graphic3d/Graphic3d_CLight.hxx
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_ShaderManager.hxx
src/OpenGl/OpenGl_View.cxx
src/Shaders/Declarations.glsl
src/Shaders/Shaders_Declarations_glsl.pxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx