0029084: Visualization, AIS_Manipulator - broken transformation is applied at Rotatio...
[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
6# create objects
7set anX 0.001
8circle c 0 0 0 0.001
9mkedge e c
10wire w e
11plane s
12mkface f1 s w
13mkface f2 s w
14ttranslate f1 $anX -0.001 0
15
16# display objects
17vtop
18vdisplay -dispMode 1 f1 f2
19vsetlocation f2 $anX 0.001 0
20vpoint vl $anX 0 0.001
21vfit
22
23# setup light
24vcaps -ffp 0
25vrenderparams -shadingModel vert
26vlight clear
27vlight add spotLight pos $anX 0 0.001 dir 0 0 -1 angle 60 constAtten 0.1 exponent 0.1 color RED1 headLight 0
28
29set aColor1 [vreadpixel 205 180 rgb name]
30set aColor2 [vreadpixel 205 220 rgb name]
31if { "$aColor1" != "RED" || "$aColor2" != "RED" } {
32 puts "Error: expected color near the light spot is RED"
33}
34
35set aColor3 [vreadpixel 205 132 rgb name]
36set aColor4 [vreadpixel 205 280 rgb name]
37if { "$aColor3" != "RED" || "$aColor4" != "RED4" } {
38 puts "Error: expected color mid from the light spot is RED4"
39}
40
41set aColor5 [vreadpixel 205 100 rgb name]
42set aColor6 [vreadpixel 205 306 rgb name]
43if { "$aColor5" != "GRAY9" || "$aColor6" != "GRAY9" } {
44 puts "Error: expected color far from the light spot is GRAY9"
45}