0032198: Visualization, TKOpenGl - per-vertex lighting ignores back/front material...
[occt.git] / tests / bugs / vis / bug30076
1 puts "============="
2 puts "0030076: Visualization, TKV3d - API to update certain vertex attribute(s) without recomputing a presentation"
3 puts "============="
4
5 set c1 {c 1 0 0}
6 set c2 {c 0 0 1}
7
8 pload VISUALIZATION
9
10 vclear
11 vinit View1
12 vdrawparray a        triangles -deinterleaved -mutable v 10 0 0 {*}$c1 v 11 0 0 {*}$c1 v 11 1 0 {*}$c1 v 11 1 0 {*}$c2 v 10 1 0 {*}$c2 v 10 0 0 {*}$c2
13 vfit
14 vdump $imagedir/${casename}_1.png
15 vdrawparray a -patch triangles -deinterleaved -mutable v 10 0 0 {*}$c2 v 11 0 0 {*}$c2 v 11 1 0 {*}$c2 v 11 1 0 {*}$c1 v 10 1 0 {*}$c1 v 10 0 0 {*}$c1
16 if { [vreadpixel 200 150 rgb name] != "RED2"  } { puts "Error: array was not updated" }
17 if { [vreadpixel 200 250 rgb name] != "BLUE2" } { puts "Error: array was not updated" }
18 vdump $imagedir/${casename}_2.png