0024130: Implementing ray tracing visualization core
[occt.git] / tests / bugs / vis / bug24130
... / ...
CommitLineData
1puts "TODO OCC24130 Debian60-64: OCCT was compiled without OpenCL support!"
2puts "TODO OCC24130 Windows: TKOpenGl | Type\: Error | ID\: 0 | Severity\: High | Message\:"
3
4puts "========"
5puts "OCC24130 Implementing ray tracing visualization core"
6puts "========"
7
8# custom shapes
9set aShape1 [locate_data_file occ/Top.brep]
10set aShape2 [locate_data_file occ/Bottom.brep]
11
12# setup 3D viewer content
13vinit name=View1 w=512 h=512
14vglinfo
15
16vvbo 0
17vsetdispmode 1
18vsetgradientbg 180 200 255 180 180 180 2
19restore $aShape1 s1
20restore $aShape2 s2
21vdisplay s1 s2
22vsetmaterial s1 Silver
23vsetmaterial s2 Pewter
24vfit
25
26# activate ray-tracing
27vraytrace 1
28vclinfo
29
30set aModeNum 0
31for { set aAAMode 0 } { $aAAMode <= 1 } { incr aAAMode } {
32 for { set aReflMode 0 } { $aReflMode <= 1 } { incr aReflMode } {
33 for { set aShadMode 0 } { $aShadMode <= 1 } { incr aShadMode } {
34 vsetraytracemode shad=$aShadMode refl=$aReflMode aa=$aAAMode
35 vdump $imagedir/${casename}_${aModeNum}.png
36 incr aModeNum
37 }
38 }
39}
40
41vtextureenv on 5
42for { set aAAMode 0 } { $aAAMode <= 1 } { incr aAAMode } {
43 for { set aShadMode 0 } { $aShadMode <= 1 } { incr aShadMode } {
44 vsetraytracemode shad=$aShadMode refl=1 aa=$aAAMode
45 vdump $imagedir/${casename}_${aModeNum}.png
46 incr aModeNum
47 }
48}