a5c60278792e172c627a8c107b0b0570225eba7c
[occt.git] / tests / v3d / glsl / texture_trsf2
1 puts "========"
2 puts "Texture 2D transformation (presentation trsf)"
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
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 -trsfTranslate 0.0 0.0 -trsfScale 0.8 2.0
32   vdump $::imagedir/${::casename}_scale_${aSuffix}.png
33
34   vtexture b_6 $aTexture -trsfTranslate 0.25 -0.25 -trsfScale 1.0 1.0
35   vdump $::imagedir/${::casename}_translate_${aSuffix}.png
36
37   vtexture b_6 $aTexture -trsfTranslate 0.25 -0.25 -trsfScale 1.1 0.8
38   vdump $::imagedir/${::casename}_${aSuffix}.png
39 }