0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / tests / v3d / glsl / phong_pos2
CommitLineData
daf73ab7 1puts "========"
2puts "0029283: Visualization - allow defining more than 8 light sources"
3puts "========"
4
5pload MODELING VISUALIZATION
6
7# display objects
8vclear
9vclose ALL
10vinit View1 -width 1024 -height 768
11vcaps -ffp 0
12vrenderparams -shadingModel phong
13vaxo
14for { set anObjIter 0 } { $anObjIter < 3 } { incr anObjIter } {
15 set aShiftX [expr -4 + $anObjIter * 4]
16 psphere s$anObjIter 0.5
17 vdisplay -dispMode 1 s$anObjIter
18 vsetlocation s$anObjIter $aShiftX 0 0
19}
20vfit
21
22# define lights
23set THE_LIGHTS {
24 { -1 -1 -1 RED1 }
25 { 1 -1 -1 YELLOW }
aaf8d6a9 26 { -1 1 -1 BLUE }
27 { -1 -1 1 CYAN }
daf73ab7 28 { 1 1 -1 PURPLE }
29 { 1 1 1 WHITE }
30 { -1 1 1 HOTPINK }
31 { 1 -1 1 GREEN }
aaf8d6a9 32 { -4 -1 0 MAGENTA }
daf73ab7 33 { 4 -1 0 MAGENTA3 }
34}
35vlight clear
36for { set aLightIter 1 } { $aLightIter <= 10 } { incr aLightIter } {
37 set aLight [lindex $THE_LIGHTS [expr $aLightIter - 1]]
38 set aColor [lindex $aLight 3]
39 set aPos [list [lindex $aLight 0] [lindex $aLight 1] [lindex $aLight 2]]
40 vlight add positional pos {*}$aPos color $aColor headLight 0
41 vpoint v${aLightIter} {*}$aPos
42 vdrawtext t${aLightIter} "light${aLightIter} $aColor" -pos {*}$aPos -color $aColor
43 vdump $::imagedir/${::casename}_${aLightIter}.png
44}