0027715: Visualization - turn off deprecated OpenGL fixed-function pipeline by default
[occt.git] / tests / bugs / vis / bug22906
1
2 puts "================"
3 puts "OCC22906"
4 puts "================"
5 puts ""
6 #######################################################################################
7 # Gradient background is clipped by planes
8 ######################################################################################
9
10 set BugNumber OCC22906
11 set x1 73
12 set y1 338
13
14 set x2 144
15 set y2 23
16
17 set x3 377
18 set y3 123
19
20 set x4 87
21 set y4 232
22
23 vinit
24 vsetgradientbg 255 0 0 0 0 255 4
25 set Color1 [vreadpixel ${x1} ${y1} rgb]
26 set Color2 [vreadpixel ${x2} ${y2} rgb]
27 set Color3 [vreadpixel ${x3} ${y3} rgb]
28 set Color4 [vreadpixel ${x4} ${y4} rgb]
29 vclipplane create pln1
30 vclipplane change pln1 equation 1 0 0 -0.1
31 vclipplane set pln1 view Driver1/Viewer1/View1
32 box b 100 100 100
33 vdisplay b
34 vsetdispmode 1
35 set ColorRes1 [vreadpixel ${x1} ${y1} rgb]
36 set ColorRes2 [vreadpixel ${x2} ${y2} rgb]
37 set ColorRes3 [vreadpixel ${x3} ${y3} rgb]
38 set ColorRes4 [vreadpixel ${x4} ${y4} rgb]
39
40 if { ${Color1} == ${ColorRes1} && ${Color2} == ${ColorRes2} && ${Color3} == ${ColorRes3} && ${Color4} == ${ColorRes4}} {
41     puts "OK ${BugNumber}"
42 } else {
43     puts "Faulty ${BugNumber}"
44 }
45
46 checkview -screenshot -3d -path ${imagedir}/${test_image}.png