0024387: Tests - use system-independent fonts in test cases
[occt.git] / tests / v3d / raytrace / bug24819
CommitLineData
a89742cf 1puts "========"
2puts "OCC24819: TKOpenGl - extend the ray-tracing core by visualization of lines, text and point sprites"
3puts "========"
4
6fb1a930 5vfont add [locate_data_file DejaVuSans.ttf] SansFont
6
a89742cf 7# setup 3D viewer content
8vinit name=View1 w=512 h=512
9vglinfo
10
11vvbo 0
12vsetdispmode 1
13vsetgradientbg 180 200 255 180 180 180 2
14# boxes
15box b1 1 1 1
16vdisplay b1
17vsetlocation b1 0 0 0.001
18vsetmaterial b1 Silver
19vsettransparency b1 0.5
20box b2 3 2 2 1 2 1
21vdisplay b2
22vsetmaterial b2 Pewter
23vsettransparency b2 0.8
24
25# brep text
6fb1a930 26text2brep t "text" -font "SansFont" -height 8
a89742cf 27vdisplay t
28
29# overlay objects
6fb1a930 30vdrawtext t1 "Overlay text!" -2d -perspos -1 1 -pos 200 -440 0 -height 40 -font SansFont
a89742cf 31
32# markers
33vpoint p 1 1 1
34vdisplay p
35vmarkerstest mTest 7 -3 0 PointsOnSide=5 MarkerType=5
36
37# 3d text
6fb1a930 38vdrawtext text0 3D_Text -pos 1 2 2 -color 1.0 0.0 0.0 -halign left -valign bottom -angle 0 -zoom 0 -height 20 -aspect regular -font SansFont
a89742cf 39
40vlight change 0 pos -1 1 1
41
42vfit
43
44# trihedron
45vzbufftrihedron
46
47# activate ray-tracing
48vrenderparams -raytrace
49
50# orthogonal projection
51set aModeNum 0
52foreach aFSAAMode {on off} {
53 foreach aReflMode {on off} {
54 foreach aShadMode {on off} {
55 vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
56 vdump $imagedir/${casename}_${aModeNum}.png
57 incr aModeNum
58 }
59 }
60}
61
62# perspective projection
6b62b2da 63vcamera -persp
a89742cf 64set aModeNum 0
65foreach aFSAAMode {on off} {
66 foreach aReflMode {on off} {
67 foreach aShadMode {on off} {
68 vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
69 vdump $imagedir/${casename}_${aModeNum}.png
70 incr aModeNum
71 }
72 }
73}