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