0027715: Visualization - turn off deprecated OpenGL fixed-function pipeline by default
[occt.git] / tests / bugs / vis / bug25552
1 puts "============"
2 puts "CR25552"
3 puts "Provide the way to hide objects within different Views of the one Viewer"
4 puts "============"
5 puts ""
6
7 set aSubShapeTriang $imagedir/${casename}_subshape_triangulation.png
8 set aShapeTriang $imagedir/${casename}_shape_triangulation.png
9 set aDiff $imagedir/${casename}_diff.png
10
11 vinit View1
12 vclear
13 vaxo
14 vsetdispmode 1
15
16 vinit View2
17 vclear
18 vaxo
19 vsetdispmode 1
20
21 box b1 0 0 0 1 2 3
22 box b2 3 0 0 2 3 1
23 box b3 0 3 0 2 3 1
24
25 vdisplay b1 b3
26 # b2 should be displayed only in View2, but not in View1
27 vdisplay -inview b2
28 #vdisplay b2
29 vaspects -noupdate b1 -setcolor RED
30 vaspects -noupdate b2 -setcolor GREEN
31 vfit
32 # b1 should be displayed only in View1
33 verase -inview b1
34 vmoveto 250 347
35
36 set aColorV2B1 [vreadpixel  50 250 rgb name]
37 if { $aColorV2B1 != "BLACK" } {
38   puts "Error: box b1 (red) should NOT be visible in View2!"
39 }
40
41 set aColorV2B2 [vreadpixel 200 350 rgb name]
42 if { $aColorV2B2 != "GREEN3" } {
43   puts "Error: box b2 (green) should be visible in View2!"
44 }
45
46 set aColorV2B3 [vreadpixel 250 200 rgb name]
47 if { $aColorV2B3 != "DARKGOLDENROD3" } {
48   puts "Error: box b3 (goldenrod) should be visible in View2!"
49 }
50 vdump $imagedir/${casename}_v2.png
51
52 vactivate View1
53 vfit
54 set aColorV1B1 [vreadpixel  50 250 rgb name]
55 if { $aColorV1B1 != "RED3" } {
56   puts "Error: box b1 (red) should be visible in View1!"
57 }
58
59 set aColorV1B2 [vreadpixel 200 350 rgb name]
60 if { $aColorV1B2 != "BLACK" } {
61   puts "Error: box b2 (green) should NOT be visible in View1!"
62 }
63
64 set aColorV1B3 [vreadpixel 250 200 rgb name]
65 if { $aColorV1B3 != "DARKGOLDENROD3" } {
66   puts "Error: box b3 (goldenrod) should be visible in View1!"
67 }
68 vdump $imagedir/${casename}_v1.png