0031279: Visualization, TKOpenGl - environment background is misplaced within Ray...
[occt.git] / tests / v3d / raytrace / bug24819
1 puts "========"
2 puts "OCC24819: TKOpenGl - extend the ray-tracing core by visualization of lines, text and point sprites"
3 puts "========"
4
5 vfont add [locate_data_file DejaVuSans.ttf] SansFont
6
7 # setup 3D viewer content
8 vinit name=View1 w=512 h=512
9 vglinfo
10
11 vvbo 0
12 vsetdispmode 1
13 vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
14 # boxes
15 box b1 1 1 1
16 vdisplay b1
17 vsetlocation b1 0 0 0.001
18 vsetmaterial b1 Silver
19 vsettransparency b1 0.5
20 box b2 3 2 2 1 2 1
21 vdisplay b2
22 vsetmaterial b2 Pewter
23 vsettransparency b2 0.8
24
25 # brep text
26 text2brep t "text" -font "SansFont" -height 8
27 vdisplay t
28
29 # overlay objects
30 vdrawtext t1 "Overlay text!" -2d -perspos -1 1 -pos 200 -440 0 -height 40 -font SansFont
31
32 # markers
33 vpoint p 1 1 1
34 vdisplay p
35 vmarkerstest mTest 7 -3 0 PointsOnSide=5 MarkerType=5
36
37 # 3d text
38 vdrawtext text0 3D_Text -pos 1 2 2 -color RED -halign left -valign bottom -angle 0 -zoom 0 -height 20 -aspect regular -font SansFont
39
40 vlight -change 0 -dir 0.577 -0.577 -0.577
41
42 vfit
43
44 # trihedron
45 vzbufftrihedron
46
47 # activate ray-tracing
48 vrenderparams -raytrace
49
50 # orthogonal projection
51 set aModeNum 0
52 foreach 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
63 vcamera -persp
64 set aModeNum 0
65 foreach 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 }