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