0022785: Draw Harness - add possibility to remove a text drawn by the command vdrawtext
[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
5# setup 3D viewer content
6vinit name=View1 w=512 h=512
7vglinfo
8
9vvbo 0
10vsetdispmode 1
11vsetgradientbg 180 200 255 180 180 180 2
12# boxes
13box b1 1 1 1
14vdisplay b1
15vsetlocation b1 0 0 0.001
16vsetmaterial b1 Silver
17vsettransparency b1 0.5
18box b2 3 2 2 1 2 1
19vdisplay b2
20vsetmaterial b2 Pewter
21vsettransparency b2 0.8
22
23# brep text
24text2brep t "text" "Arial" 8
25vdisplay t
26
27# overlay objects
28voverlaytext "Overlay text!" 200 440 40
29
30# markers
31vpoint p 1 1 1
32vdisplay p
33vmarkerstest mTest 7 -3 0 PointsOnSide=5 MarkerType=5
34
35# 3d text
29e2c6d2 36vdrawtext 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
a89742cf 37
38vlight change 0 pos -1 1 1
39
40vfit
41
42# trihedron
43vzbufftrihedron
44
45# activate ray-tracing
46vrenderparams -raytrace
47
48# orthogonal projection
49set aModeNum 0
50foreach aFSAAMode {on off} {
51 foreach aReflMode {on off} {
52 foreach aShadMode {on off} {
53 vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
54 vdump $imagedir/${casename}_${aModeNum}.png
55 incr aModeNum
56 }
57 }
58}
59
60# perspective projection
6b62b2da 61vcamera -persp
a89742cf 62set aModeNum 0
63foreach aFSAAMode {on off} {
64 foreach aReflMode {on off} {
65 foreach aShadMode {on off} {
66 vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
67 vdump $imagedir/${casename}_${aModeNum}.png
68 incr aModeNum
69 }
70 }
71}