0024070: OpenGL capped object-level clipping planes
[occt.git] / tests / bugs / vis / bug22906
1 puts "TODO ?OCC11111 ALL: An exception was caught"
2 puts "TODO ?OCC11111 ALL: \\*\\* Exception"
3 puts "TODO ?OCC11111 ALL: TEST INCOMPLETE"
4
5 puts "================"
6 puts "OCC22906"
7 puts "================"
8 puts ""
9 #######################################################################################
10 # Gradient background is clipped by planes
11 ######################################################################################
12
13 set BugNumber OCC22906
14 set x1 73
15 set y1 338
16
17 set x2 144
18 set y2 23
19
20 set x3 377
21 set y3 123
22
23 set x4 87
24 set y4 232
25
26 vinit
27 vsetgradientbg 255 0 0 0 0 255 4
28 set Color1 [QAGetPixelColor ${x1} ${y1}]
29 set Color2 [QAGetPixelColor ${x2} ${y2}]
30 set Color3 [QAGetPixelColor ${x3} ${y3}]
31 set Color4 [QAGetPixelColor ${x4} ${y4}]
32 vclipplane create pln1
33 vclipplane change pln1 equation 1 0 0 -0.1
34 vclipplane set pln1 view Driver1/Viewer1/View1
35 box b 100 100 100
36 vdisplay b
37 vsetdispmode 1
38 set ColorRes1 [QAGetPixelColor ${x1} ${y1}]
39 set ColorRes2 [QAGetPixelColor ${x2} ${y2}]
40 set ColorRes3 [QAGetPixelColor ${x3} ${y3}]
41 set ColorRes4 [QAGetPixelColor ${x4} ${y4}]
42
43 set status 0
44 if { ${Color1} == ${ColorRes1} && ${Color2} == ${ColorRes2} && ${Color3} == ${ColorRes3} && ${Color4} == ${ColorRes4}} {
45     set status 0
46 } else {
47     set status 1
48 }
49
50 # Resume
51 puts ""
52 if { ${status} != 0} {
53    puts "Faulty ${BugNumber}"
54 } else {
55    puts "OK ${BugNumber}"
56 }
57 set only_screen 1