0030182: Visualization, Image_AlienPixMap - support reading encoded image from memory...
[occt.git] / tests / bugs / vis / bug30434
CommitLineData
0e3025bc 1puts "============="
2puts "0030434: Visualization, TKV3d - add 'NoUpdate' state of frustum culling optimization"
3puts "============="
4
5pload VISUALIZATION
6vclear
7vinit View1
8
9set THE_NB_POINTS 10
10puts "Creating [expr $THE_NB_POINTS * $THE_NB_POINTS * $THE_NB_POINTS] points..."
11for {set i 0} {$i < $THE_NB_POINTS} {incr i} {
12 for {set j 0} {$j < $THE_NB_POINTS} {incr j} {
13 for {set k 0} {$k < $THE_NB_POINTS} {incr k} {
14 vpoint p$i$j$k 3.*$i 3.*$j 3.*$k
15 }
16 }
17}
18
19vcamera -ortho
20vfront
21vfit
22vzoom 2
23vrenderparams -frustumculling on
24vrenderparams -frustumculling noupdate
25vfit
26if { [vreadpixel 92 92 rgb name] == "YELLOW" } { puts "Error: point should be clipped earlier" }
27vdump $::imagedir/${::casename}_ortho_culled.png
28vrenderparams -frustumculling off
29if { [vreadpixel 92 92 rgb name] != "YELLOW" } { puts "Error: point should NOT be clipped" }
30vdump $::imagedir/${::casename}_ortho_all.png
31
32vcamera -persp
33vaxo
34vfit
35vzoom 3
36vrenderparams -frustumculling on
37vrenderparams -frustumculling noupdate
38vfit
39if { [vreadpixel 114 92 rgb name] == "YELLOW" } { puts "Error: point should be clipped earlier" }
40vdump $::imagedir/${::casename}_persp_culled.png
41vrenderparams -frustumculling off
42if { [vreadpixel 114 92 rgb name] != "YELLOW" } { puts "Error: point should NOT be clipped" }
43vdump $::imagedir/${::casename}_persp_all.png