1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
puts "========"
puts "Per-pixel lighting using GLSL program (Phong shading)"
puts "========"
# create box
box b 1 2 3
# draw box
vclear
vclose ALL
vinit View1
vsetdispmode 1
vaxo
vdisplay b
vfit
vrotate 0.2 0.0 0.0
vshaderprog b phong
vdump $::imagedir/${::casename}_v1.png
vinit View2
vfit
vdump $::imagedir/${::casename}_v2.png
vmoveto 250 250
vdump $::imagedir/${::casename}_v2sel.png
vactivate View1
vdump $::imagedir/${::casename}_v1sel.png
vclose View2
|