0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / tests / v3d / glsl / tiles
CommitLineData
3bffef55 1puts "========"
2puts "Tiled image dump"
3puts "========"
4
5set aFontFile ""
6catch { set aFontFile [locate_data_file DejaVuSans.ttf] }
7
8pload MODELING VISUALIZATION
9box b 2 3 1
10box b2 50 20 30
11
12set aLabelFont "Arial"
13if { "$aFontFile" != "" } {
14 vfont add "$aFontFile" SansFont
15 set aLabelFont "SansFont"
16}
17
18vclear
8e0a2b19 19vclose ALL
3bffef55 20vinit View1
21vraytrace 0
aaf8d6a9 22vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
3bffef55 23vsetdispmode 0
24vdisplay -dispMode 1 b
25vfit
26vrotate 0.5 0 0
27vzbufftrihedron
28
29catch { vzlayer del 1 }
7c3ef2f7 30set aLayerId [vzlayer add]
1c728f2d 31vzlayer $aLayerId -enable depthClear -disable rayTracing
3bffef55 32
33vtrihedron trh
7c3ef2f7 34vdisplay -noupdate trh -layer $aLayerId -trihedron topRight 100 100
3bffef55 35
36text2brep tcc "Center" -font $aLabelFont -height 30 -pos -40 0 0
7c3ef2f7 37vdisplay -noupdate tcc -2d center -layer $aLayerId -dispMode 1
3bffef55 38polyline lcc -50 -50 0 -50 50 0 50 50 0 50 0 0 0 -50 0 -50 -50 0
7c3ef2f7 39vdisplay -noupdate lcc -2d center -layer $aLayerId
3bffef55 40vsetwidth -noupdate lcc 2
41
42text2brep tbl "Bottom-Left" -font $aLabelFont -height 30 -pos 0 3 5
7c3ef2f7 43vdisplay -noupdate tbl -2d bottomLeft -layer $aLayerId -dispMode 1
3bffef55 44polyline lbl 0 0 0 0 100 0 100 100 0 100 50 0 50 0 0 0 0 0
7c3ef2f7 45vdisplay -noupdate lbl -2d bottomLeft -layer $aLayerId
3bffef55 46vsetwidth -noupdate lbl 2
47
48text2brep ttl "Top-Left" -font $aLabelFont -height 30 -pos 0 -30 0
7c3ef2f7 49vdisplay -noupdate ttl -2d topLeft -layer $aLayerId -dispMode 1
3bffef55 50polyline ltl 0 -100 0 0 0 0 100 0 0 100 -50 0 50 -100 0 0 -100 0
7c3ef2f7 51vdisplay -noupdate ltl -2d topLeft -layer $aLayerId
3bffef55 52vsetwidth -noupdate ltl 2
53
54text2brep ttr "Top-Right" -font $aLabelFont -height 30 -pos -130 -30 0
7c3ef2f7 55vdisplay -noupdate ttr -2d topRight -layer $aLayerId -dispMode 1
3bffef55 56polyline ltr -100 -100 0 -100 0 0 0 0 0 0 -50 0 -50 -100 0 -100 -100 0
7c3ef2f7 57vdisplay -noupdate ltr -2d topRight -layer $aLayerId
3bffef55 58vsetwidth -noupdate ltr 2
59
60text2brep tbr "Bottom-Right" -font $aLabelFont -height 30 -pos -180 3 0
7c3ef2f7 61vdisplay -noupdate tbr -2d bottomRight -layer $aLayerId -dispMode 1
3bffef55 62polyline lbr -100 0 0 -100 100 0 0 100 0 0 50 0 -50 0 0 -100 0 0
7c3ef2f7 63vdisplay -noupdate lbr -2d bottomRight -layer $aLayerId
3bffef55 64vsetwidth -noupdate lbr 2
65
66vdrawtext t2 "Label" -pos 1 0 1 -font $aLabelFont
67vdisplay b2 -trsfPers zoom -trsfPersPos 1 0 1
68
e3d02d1f 69vdump $::imagedir/${::casename}_409x409_tile0.png
70vdump $::imagedir/${::casename}_409x409_tile128.png -tileSize 128
71vdump $::imagedir/${::casename}_409x409_tile1024.png -tileSize 1024
72vdump $::imagedir/${::casename}_1920x1080_tile0.png -width 1920 -height 1920
73vdump $::imagedir/${::casename}_1920x1080_tile128.png -width 1920 -height 1920 -tileSize 128
74vdump $::imagedir/${::casename}_1920x1080_tile1024.png -width 1920 -height 1920 -tileSize 1024
75diffimage $::imagedir/${::casename}_409x409_tile0.png $::imagedir/${::casename}_409x409_tile128.png 0 0 0 $::imagedir/${::casename}_409x409_tile128diff.png
3bffef55 76
77# check dump with stereo
78vstereo anaglyph
e3d02d1f 79vdump $::imagedir/${::casename}_409x409_stereotile0.png -stereo blend
80vdump $::imagedir/${::casename}_409x409_stereotile128.png -stereo blend -tileSize 128
81vdump $::imagedir/${::casename}_409x409_stereotile1024.png -stereo blend -tileSize 1024
82vdump $::imagedir/${::casename}_1920x1080_stereotile0.png -width 1920 -height 1920 -stereo blend
83vdump $::imagedir/${::casename}_1920x1080_stereotile128.png -width 1920 -height 1920 -stereo blend -tileSize 128
84vdump $::imagedir/${::casename}_1920x1080_stereotile1024.png -width 1920 -height 1920 -stereo blend -tileSize 1024
85diffimage $::imagedir/${::casename}_409x409_stereotile0.png $::imagedir/${::casename}_409x409_stereotile128.png 0 0 0 $::imagedir/${::casename}_409x409_stereotile128diff.png
3bffef55 86
87# check dump with Ray Tracing
88vraytrace 1
e3d02d1f 89vdump $::imagedir/${::casename}_409x409_rttile0.png -stereo blend
90vdump $::imagedir/${::casename}_409x409_rttile128.png -stereo blend -tileSize 128
91vdump $::imagedir/${::casename}_409x409_rttile1024.png -stereo blend -tileSize 1024
92vdump $::imagedir/${::casename}_1920x1080_rttile0.png -width 1920 -height 1920 -stereo blend
93vdump $::imagedir/${::casename}_1920x1080_rttile128.png -width 1920 -height 1920 -stereo blend -tileSize 128
94vdump $::imagedir/${::casename}_1920x1080_rttile1024.png -width 1920 -height 1920 -stereo blend -tileSize 1024
3bffef55 95vraytrace 0