392ac980 |
1 | puts "========" |
2 | puts "Per-pixel lighting using GLSL program (Phong shading)" |
3 | puts "========" |
4 | |
5 | # create box |
6 | box b 1 2 3 |
7 | |
8 | # draw box |
9 | vinit View1 |
10 | vclear |
11 | vsetdispmode 1 |
12381341 |
12 | vaxo |
392ac980 |
13 | vdisplay b |
14 | vfit |
15 | vrotate 0.2 0.0 0.0 |
16 | |
17 | # take snapshot with fixed pipeline |
18 | vdump $::imagedir/${::casename}_OFF.png |
19 | vshaderprog b phong |
20 | vdump $::imagedir/${::casename}_ph1.png |
21 | |
22 | vclear |
23 | vdisplay b |
24 | vshaderprog b phong |
25 | vdump $::imagedir/${::casename}_ph2.png |
26 | vmoveto 250 250 |