2 puts "OCC24819: TKOpenGl - extend the ray-tracing core by visualization of lines, text and point sprites"
5 vfont add [locate_data_file DejaVuSans.ttf] SansFont
7 # setup 3D viewer content
8 vinit name=View1 w=512 h=512
13 vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
17 vsetlocation b1 0 0 0.001
18 vsetmaterial b1 Silver
19 vsettransparency b1 0.5
22 vsetmaterial b2 Pewter
23 vsettransparency b2 0.8
26 text2brep t "text" -font "SansFont" -height 8
30 vdrawtext t1 "Overlay text!" -2d -perspos -1 1 -pos 200 -440 0 -height 40 -font SansFont
35 vmarkerstest mTest 7 -3 0 PointsOnSide=5 MarkerType=5
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
40 vlight -change 0 -dir 0.577 -0.577 -0.577
47 # activate ray-tracing
48 vrenderparams -raytrace
50 # orthogonal projection
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
62 # perspective projection
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