0024755: TDF_Label::AddAttribute() reverses the order of added attributes
[occt.git] / tests / v3d / glsl / phong_fuse2
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
14 vaxo
15 vdisplay f
16 vfit
17 vrotate -0.5 0.0 0.0
18 vfit
19
20 # setup lights
21 vlight delete 0
22 vlight delete 0
23 vlight delete 0
24 vlight delete 0
25 vlight delete 0
26 vlight add ambient                color WHITE
27 vlight add directional dir  1 0 0 color GREEN headlight 1
28 vlight add directional dir -1 0 0 color RED1  headlight 1
29
30 # take snapshot with fixed pipeline
31 vdump $::imagedir/${::casename}_OFF.png
32 vshaderprog f phong
33 vdump $::imagedir/${::casename}_ph1.png
34
35 vclear
36 vdisplay f
37 vshaderprog f phong
38 vdump $::imagedir/${::casename}_ph2.png
39 vmoveto 250 250