1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
occt/tests/v3d/glsl/phong_views
kgv 1238134135 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
2013-11-05 10:19:58 +04:00

23 lines
329 B
Plaintext

puts "========"
puts "Per-pixel lighting using GLSL program (Phong shading)"
puts "========"
# create box
box b 1 2 3
# draw box
vinit View1
vclear
vsetdispmode 1
vaxo
vdisplay b
vfit
vrotate 0.2 0.0 0.0
vshaderprog b phong
vdump $::imagedir/${::casename}_1.png
vinit View2
vdump $::imagedir/${::casename}_2.png
vclose View2