0032208: Tests - refactor visualization tests to cover several graphic drivers
[occt.git] / tests / v3d / bugs / bug28890
1 puts "============"
2 puts "0028890: Visualization - After closing all views and then display the view again, just the first view has object(s) displayed"
3 puts "============"
4 puts ""
5
6 pload MODELING VISUALIZATION
7 vclear
8 vclose ALL
9 box b1_1 0 0 0 1 2 3
10 box b1_2 0 3 0 3 1 2
11 box b2_1 0 0 0 3 1 2
12 box b2_2 0 3 0 1 2 3
13
14 # fill first Viewer
15 vinit Driver1/Viewer1/View1
16 vzbufftrihedron
17 vdisplay -dispMode 1 b1_1 b1_2
18 vfit
19 vsetcolor b1_1 RED
20 vsetcolor b1_2 GREEN
21
22 # fill second Viewer
23 vinit Driver1/Viewer2/View1
24 vzbufftrihedron
25 vdisplay -dispMode 1 b2_1 b2_2
26 vfit
27 vsetcolor b2_1 RED
28 vsetcolor b2_2 GREEN
29
30 # enable RayTracing which sets DeviceLost flag
31 vactivate Driver1/Viewer1/View1
32 vraytrace 1
33 set aColor1 [vreadpixel 150 250 rgb]
34 vdump $::imagedir/${::casename}_1.png
35
36 vactivate Driver1/Viewer2/View1
37 vraytrace 1
38 set aColor2 [vreadpixel 150 250 rgb]
39 vdump $::imagedir/${::casename}_2.png
40
41 # check that DeviceLost flag is processed by both Viewers
42 if { "$aColor1" != "$aColor2" } { puts "Error: colors should be equal" }