0029564: STEP Import and Export failure
[occt.git] / tests / v3d / glsl / gouraud_spot1
CommitLineData
5f4bd4d4 1puts "========"
2puts "Per-vertex lighting using built-in GLSL program, one spot light source."
3puts "Visual comparison with the reference snapshot should be performed for this test case."
4puts "========"
5
8e0a2b19 6vclear
7vclose ALL
8vinit View1
9
5f4bd4d4 10# create objects
11set anX 0.001
12circle c 0 0 0 0.001
13mkedge e c
14wire w e
15plane s
16mkface f1 s w
17mkface f2 s w
18ttranslate f1 $anX -0.001 0
19
20# display objects
21vtop
22vdisplay -dispMode 1 f1 f2
23vsetlocation f2 $anX 0.001 0
24vpoint vl $anX 0 0.001
25vfit
26
27# setup light
28vcaps -ffp 0
29vrenderparams -shadingModel vert
30vlight clear
31vlight add spotLight pos $anX 0 0.001 dir 0 0 -1 angle 60 constAtten 0.1 exponent 0.1 color RED1 headLight 0
32
33set aColor1 [vreadpixel 205 180 rgb name]
34set aColor2 [vreadpixel 205 220 rgb name]
35if { "$aColor1" != "RED" || "$aColor2" != "RED" } {
36 puts "Error: expected color near the light spot is RED"
37}
38
39set aColor3 [vreadpixel 205 132 rgb name]
40set aColor4 [vreadpixel 205 280 rgb name]
41if { "$aColor3" != "RED" || "$aColor4" != "RED4" } {
42 puts "Error: expected color mid from the light spot is RED4"
43}