4ba3d39057543723bc4852ad637cd9afcce30059
[occt.git] / tests / v3d / glsl / rendscale
1 puts "========"
2 puts "Rendering resolution scale factor"
3 puts "========"
4
5 set aFontFile ""
6 catch { set aFontFile [locate_data_file DejaVuSans.ttf] }
7
8 pload MODELING VISUALIZATION
9
10 set aLabelFont "Arial"
11 if { "$aFontFile" != "" } {
12   vfont add "$aFontFile" SansFont
13   set aLabelFont "SansFont"
14 }
15
16 box b 1 2 3
17 vclear
18 vclose ALL
19 vinit View1
20 vdisplay b
21 vfit
22 vpoint p 0 0 0
23 vzbufftrihedron
24 vdrawtext t Text2d -font $aLabelFont
25 vtrihedron tt
26 vdisplay -trsfPers zoom -trsfPersPos 1 0 0 tt
27 text2brep ttl "Top-Left" -font $aLabelFont -height 30 -pos 0 -30 0
28 vdisplay  ttl -2d topLeft -dispMode 1
29 vcolorscale cs -demo
30
31 vrenderparams -rendScale 1
32 vdump $::imagedir/${::casename}_100.png
33
34 vrenderparams -rendScale 0.5
35 vdump $::imagedir/${::casename}_050.png
36
37 vrenderparams -rendScale 0.75
38 vdump $::imagedir/${::casename}_075.png
39
40 vrenderparams -rendScale 2
41 vdump $::imagedir/${::casename}_200.png