0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / tests / v3d / glsl / phong_pos4
CommitLineData
992ed6b3 1puts "========"
2puts "0029283: Visualization - allow defining more than 8 light sources"
3puts "Test case creates about 100 of light sources."
4puts "========"
5
6pload MODELING VISUALIZATION
7
8vclear
9vclose ALL
10vinit View1
11vcaps -ffp 0
12vrenderparams -shadingModel phong
13box b -50 5 -50 100 100 100
14vdisplay -dispMode 1 b
15vfront
16vfit
17
18# define lights
aaf8d6a9 19set THE_COLORS { RED1 YELLOW BLUE CYAN PURPLE WHITE HOTPINK GREEN MAGENTA MAGENTA3 }
992ed6b3 20vlight clear
21set aNbColors 10
22set aLightIndex 0
23set aConstAtten 0.1
24set aLinAtten 1
25set aRand [expr srand(1)]
26for { set anZIter -50 } { $anZIter <= 50 } { set anZIter [expr $anZIter + 10] } {
27 for { set anXIter -50 } { $anXIter <= 50 } { set anXIter [expr $anXIter + 10] } {
28 set anIndex [expr {int(rand() * $aNbColors)}]
29 set aColor [lindex $THE_COLORS $anIndex]
30 set aPos "$anXIter 0 $anZIter"
31 vlight -add positional -pos {*}$aPos -color $aColor -headLight 0 -constAttenuation $aConstAtten -linearAttenuation $aLinAtten
32 vpoint v${aLightIndex} {*}$aPos
33 set aLightIndex [expr $aLightIndex + 1]
34 }
35}