0024310: TKOpenGl - GLSL compatibility issues
authorkgv <kgv@opencascade.com>
Mon, 4 Nov 2013 00:42:44 +0000 (04:42 +0400)
committerabv <abv@opencascade.com>
Tue, 5 Nov 2013 06:19:58 +0000 (10:19 +0400)
commit123813413566a4fc07c6e57a8f9fb0709bbb14ab
tree947db9621862898df013d2c2922b51e10b3f13b5
parente91d202a72d48fce8b43ad0799e5f630ccf321c0
0024310: TKOpenGl - GLSL compatibility issues

Lights defintion clean up:
- remove duplicated enumeration TLightType (equals to Visual3d_TypeOfLightSource)
- remove unused fields from Graphic3d_CLight
- OpenGl_Light, reuse Graphic3d_CLight definition

Phong GLSL program:
- move out cumulative ambient light intencity from limited list of lights
- compatibility issues, replace array of structures (light sources, materials, clipping planes) with arrays of primitive types

New Draw Harness command vlight to alter light sources definition.

OpenGl_ShaderProgram::Initialize() - add missing Linker log
29 files changed:
src/Graphic3d/Graphic3d_CLight.hxx
src/Graphic3d/Graphic3d_CView.hxx
src/Graphic3d/Graphic3d_GraphicDriver.cdl
src/Graphic3d/Graphic3d_GraphicDriver.cxx
src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx
src/InterfaceGraphic/InterfaceGraphic_telem.hxx
src/NCollection/NCollection_Vec4.hxx
src/OpenGl/OpenGl_Light.hxx
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_ShaderProgram.cxx
src/OpenGl/OpenGl_ShaderProgram.hxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View_2.cxx
src/OpenGl/OpenGl_Workspace_Raytrace.cxx
src/Shaders/Declarations.glsl
src/Shaders/DeclarationsImpl.glsl [new file with mode: 0644]
src/Shaders/PhongShading.fs
src/Shaders/PhongShading.vs
src/V3d/V3d_Light.cdl
src/V3d/V3d_Light.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/Visual3d/Visual3d_Light.cdl
src/Visual3d/Visual3d_Light.cxx
src/Visual3d/Visual3d_View.cxx
tests/v3d/glsl/phong_box
tests/v3d/glsl/phong_couple
tests/v3d/glsl/phong_fuse
tests/v3d/glsl/phong_fuse2 [new file with mode: 0644]
tests/v3d/glsl/phong_views