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