f5cb0a2cd46798c8d6aff30c31bf8bd22605e5ef
[occt.git] / tests / v3d / raytrace / bug24130
1 puts "TODO ?OCC24130 Debian60-64: OCCT was compiled without OpenCL support!"
2 puts "TODO ?OCC24130 Windows: TKOpenGl | Type\: Error | ID\: 0 | Severity\: High | Message\:"
3
4 puts "========"
5 puts "OCC24130 Implementing ray tracing visualization core"
6 puts "========"
7
8 # custom shapes
9 set aShape1 [locate_data_file occ/Top.brep]
10 set aShape2 [locate_data_file occ/Bottom.brep]
11
12 # setup 3D viewer content
13 vinit name=View1 w=512 h=512
14 vglinfo
15
16 vvbo 0
17 vsetdispmode 1
18 vsetgradientbg 180 200 255 180 180 180 2
19 restore $aShape1 s1
20 restore $aShape2 s2
21 vdisplay s1 s2
22 vsetmaterial s1 Silver
23 vsetmaterial s2 Pewter
24 vfit
25
26 # activate ray-tracing
27 vraytrace 1
28 vclinfo
29
30 set aModeNum 0
31 for { 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
41 vtextureenv on 5
42 for { 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 }