392ac980 |
1 | puts "========" |
2 | puts "Per-pixel lighting using GLSL program (Phong shading)" |
3 | puts "========" |
4 | |
0d828ac8 |
5 | pload MODELING VISUALIZATION |
6 | |
392ac980 |
7 | # import model |
8 | restore [locate_data_file occ/fuse.brep] f |
9 | tclean f |
10 | |
11 | # draw box |
392ac980 |
12 | vclear |
8e0a2b19 |
13 | vinit View1 |
4c513386 |
14 | vdefaults -absDefl 0.5 |
392ac980 |
15 | vsetdispmode 1 |
12381341 |
16 | vaxo |
392ac980 |
17 | vdisplay f |
18 | vfit |
19 | vrotate -0.5 0.0 0.0 |
20 | vfit |
21 | |
22 | # take snapshot with fixed pipeline |
23 | vdump $::imagedir/${::casename}_OFF.png |
24 | vshaderprog f phong |
25 | vdump $::imagedir/${::casename}_ph1.png |
26 | |
27 | vclear |
28 | vdisplay f |
29 | vshaderprog f phong |
30 | vdump $::imagedir/${::casename}_ph2.png |
31 | vmoveto 250 250 |