0029290: Visualization, TKOpenGl - allow defining Light source per ZLayer
authorkgv <kgv@opencascade.com>
Thu, 2 Nov 2017 12:36:20 +0000 (15:36 +0300)
committerkgv <kgv@opencascade.com>
Thu, 30 Nov 2017 20:09:23 +0000 (23:09 +0300)
commit992ed6b3c05f5fa60edfde74d4bb6c49daa27574
treeebe7943a7ba1d7d16f5b62bbee46f3d9a7e47d5e
parent3cbd0a8e87d9cecdc434b6db33d6b611fbeedb82
0029290: Visualization, TKOpenGl - allow defining Light source per ZLayer

Graphic3d_CLight is now defined as a class inheriting Standard_Transient,
so that it's fields now should be accessed through methods.
Graphic3d_CLight::IsEnabled() - new property allowing to disable light source everywhere.
Confusing alias OpenGl_Light has been removed.

Graphic3d_CLight::SetAttenuation() - the upper limit 1.0 of attenuation factors has been removed
since it contradicts to OpenGL specs and does not make sense.

Graphic3d_ZLayerSettings::Lights() - light sources list is now property of ZLayer.
When defined, it overrides light sources defined for View/Viewer.
New class Graphic3d_LightSet has been defined to define a set of light sources.

V3d_Light - removed obsolete interface for debug drawing lights sources.
V3d_Light is now an alias to Graphic3d_CLight.
V3d_TypeOfLight is now defined as a typedef to Graphic3d_TypeOfLightSource.
61 files changed:
dox/dev_guides/upgrade/upgrade.md
samples/mfc/occtdemo/Textures/Textures_Presentation.cpp
samples/mfc/occtdemo/TexturesExt/TexturesExt_Presentation.cpp
samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp
samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp
samples/tcl/materials.tcl
src/Graphic3d/FILES
src/Graphic3d/Graphic3d_CLight.cxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_CLight.hxx
src/Graphic3d/Graphic3d_CView.hxx
src/Graphic3d/Graphic3d_LightSet.cxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_LightSet.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_TypeOfLightSource.hxx
src/Graphic3d/Graphic3d_TypeOfShadingModel.hxx
src/Graphic3d/Graphic3d_ZLayerSettings.hxx
src/OpenGl/FILES
src/OpenGl/OpenGl_Layer.cxx
src/OpenGl/OpenGl_LayerList.cxx
src/OpenGl/OpenGl_Light.hxx [deleted file]
src/OpenGl/OpenGl_SceneGeometry.cxx
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_ShaderManager.hxx
src/OpenGl/OpenGl_ShaderStates.cxx
src/OpenGl/OpenGl_ShaderStates.hxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_Raytrace.cxx
src/OpenGl/OpenGl_View_Redraw.cxx
src/StdPrs/StdPrs_Plane.cxx
src/V3d/FILES
src/V3d/V3d.cxx
src/V3d/V3d.hxx
src/V3d/V3d_AmbientLight.cxx
src/V3d/V3d_AmbientLight.hxx
src/V3d/V3d_DirectionalLight.cxx
src/V3d/V3d_DirectionalLight.hxx
src/V3d/V3d_Light.cxx [deleted file]
src/V3d/V3d_Light.hxx
src/V3d/V3d_ListOfLight.hxx
src/V3d/V3d_PositionLight.cxx
src/V3d/V3d_PositionLight.hxx
src/V3d/V3d_PositionalLight.cxx
src/V3d/V3d_PositionalLight.hxx
src/V3d/V3d_SpotLight.cxx
src/V3d/V3d_SpotLight.hxx
src/V3d/V3d_TypeOfLight.hxx
src/V3d/V3d_View.cxx
src/V3d/V3d_View.hxx
src/V3d/V3d_Viewer.cxx
src/V3d/V3d_Viewer.hxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/v3d/glsl/phong_pos1
tests/v3d/glsl/phong_pos3 [new file with mode: 0644]
tests/v3d/glsl/phong_pos4 [new file with mode: 0644]
tests/v3d/materials/bug24855
tests/v3d/raytrace/bug24130
tests/v3d/raytrace/bug24819
tests/v3d/raytrace/bug25201
tests/v3d/raytrace/bug26617
tests/v3d/raytrace/refraction
tests/v3d/raytrace/textures