0031478: Visualization, TKOpenGl - allow uploading Cubemap in compressed DDS format...
[occt.git] / tests / v3d / glsl / texture_trsf3
1 puts "========"
2 puts "Texture 2D transformation (presentation trsf) on DDS texture"
3 puts "========"
4
5 set aTexture [locate_data_file bug31478_texture_trsf_ref_dxt3.dds]
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 -trsfAngle 0
32   vdump $::imagedir/${::casename}_scale_${aSuffix}.png
33
34   vtexture b_6 $aTexture -trsfTranslate 0.25 -0.25 -trsfScale 1.0 1.0 -trsfAngle 0
35   vdump $::imagedir/${::casename}_translate_${aSuffix}.png
36
37   vtexture b_6 $aTexture -trsfTranslate 0.0 0.1 -trsfScale 1 1.1 -trsfAngle 30
38   vdump $::imagedir/${::casename}_rotate_${aSuffix}.png
39
40   vtexture b_6 $aTexture -trsfTranslate 0.25 -0.25 -trsfScale 1.1 0.8 -trsfAngle 0
41   vdump $::imagedir/${::casename}_${aSuffix}.png
42 }