79f4f036 |
1 | puts "========" |
a6dee93d |
2 | puts "Texture 2D transformation (UV coordinates generation)" |
79f4f036 |
3 | puts "========" |
4 | |
5 | set aTexture [locate_data_file bug26122_texture_trsf_ref.png] |
6 | pload MODELING VISUALIZATION |
7 | box b 1 1 1 |
8 | explode b F |
ba00aab7 |
9 | |
10 | for { set aPass 0 } { $aPass < 2 } { incr aPass } { |
11 | vclear |
12 | vclose ALL |
13 | |
14 | set aSuffix "" |
15 | if { $aPass == 0 } { |
16 | set aSuffix "ffp" |
17 | vcaps -ffp 1 |
18 | } else { |
19 | set aSuffix "glsl" |
20 | vcaps -ffp 0 |
21 | } |
22 | |
23 | vinit View1 w=512 h=512 |
24 | vtop |
25 | vdisplay -dispMode 1 b_6 |
26 | vfit |
27 | |
28 | vtexture b_6 $aTexture -modulate off |
29 | vdump $::imagedir/${::casename}_identity_${aSuffix}.png |
30 | |
31 | vtexture b_6 $aTexture -origin 0.0 0.0 -scale 1.25 0.5 |
32 | vdump $::imagedir/${::casename}_scale_${aSuffix}.png |
33 | |
34 | vtexture b_6 $aTexture -origin 0.25 -0.25 -scale 1.0 1.0 |
35 | vdump $::imagedir/${::casename}_translate_${aSuffix}.png |
36 | |
37 | vtexture b_6 $aTexture -origin 0.25 -0.25 -scale 1.1 0.8 |
38 | vdump $::imagedir/${::casename}_${aSuffix}.png |
39 | } |