0030690: Draw Harness - provide XDisplay command for displaying XDE document
[occt.git] / tests / v3d / glsl / interior2
1 puts "============"
2 puts "0029076: Visualization - implement element shrinking Shader"
3 puts "Test case on boxes"
4 puts "============"
5 puts ""
6
7 pload MODELING VISUALIZATION
8 vclear
9 vclose ALL
10 vinit View1 -width 768 -height 409
11 vzbufftrihedron
12 vbackground -gradient 0.705882 0.784314 1  0.705882 0.705882 0.705882 -gradientMode VERTICAL
13 box b1 -2 0  2 1 0.2 1
14 box b2  2 0  2 1 0.2 1
15 box b3  0 0  0 1 0.2 1
16 box b4 -2 0 -2 1 0.2 1
17 box b5  2 0 -2 1 0.2 1
18 vdisplay -dispMode 1 b1 b2 b3 b4 b5
19 vfit
20
21 vaspects  b1 -setShadingModel PHONG -setInteriorStyle HOLLOW -setDrawEdges 1 -color BLACK
22 vdrawtext t1 " b1: phong hollow-edges " -pos -2 0 2 -halign RIGHT -disptype SUBTITLE -color WHITE -subColor BLACK
23
24 vaspects  b2 -setShadingModel GOURAUD -setInteriorStyle SOLID -setDrawEdges 1 -setEdgeColor YELLOW
25 vdrawtext t2 " b2: gouraud solid-edges " -pos 2 0 2 -halign RIGHT -disptype SUBTITLE -color BLACK -subColor YELLOW
26
27 vaspects  b3 -setShadingModel PHONG -setInteriorStyle SOLID -setDrawEdges 1 -edgeWidth 2 -setEdgeColor BLUE1
28 vdrawtext t3 " b3: phong solid-edges " -pos 0 0 0 -halign RIGHT -disptype SUBTITLE -color WHITE -subColor BLUE1
29
30 vaspects  b4 -setShadingModel GOURAUD -setInteriorStyle HIDDENLINE -setDrawEdges 1 -setEdgeColor RED
31 vdrawtext t4 " b4: hiddenline-edges " -pos -2 0 -2 -halign RIGHT -disptype SUBTITLE -color BLACK -subColor RED
32
33 vaspects  b5 -setShadingModel FLAT -setInteriorStyle SOLID -setDrawEdges 1 -setEdgeColor 0 1 0 0 -edgeWidth 3
34 vdrawtext t5 " b5: flat solid-edges " -pos 2 0 -2 -halign RIGHT -disptype SUBTITLE -color BLACK -subColor GREEN
35
36 vdrawparray p6 triangles v 0 0 0 v 0 1 0 v 1 1 0 v 1 0 0 v 2 1 0 v 2 0 0 e 3 e 1 e 2 e 1 e 3 e 4 e 5 e 4 e 3 e 4 e 5 e 6
37 vlocation p6 -setLocation 2 1 0
38 vaspects p6 -setInteriorStyle SOLID -setDrawEdges 1 -setEdgeColor FIREBRICK -setEdgeWidth 4 -setQuadEdges 1
39 vdrawtext t6 " p6: quads " -pos 2 1 -0.4 -halign RIGHT -disptype SUBTITLE -color BLACK -subColor FIREBRICK
40
41 vrenderparams -msaa 0
42 vcaps -polygonMode 1
43 vdump $imagedir/${casename}_ortho_polmode.png
44
45 vcaps -polygonMode 0
46 vdump $imagedir/${casename}_ortho_glsl.png
47
48 vrenderparams -msaa 4
49 vcaps -polygonMode 1
50 vdump $imagedir/${casename}_ortho_polmode_msaa.png
51
52 vcaps -polygonMode 0
53 vdump $imagedir/${casename}_ortho_glsl_msaa.png
54
55 vcamera -persp
56 vzoom 0.7
57 vrenderparams -msaa 0
58 vcaps -polygonMode 1
59 vdump $imagedir/${casename}_persp_polmode.png
60
61 vcaps -polygonMode 0
62 vdump $imagedir/${casename}_persp_glsl.png
63
64 vrenderparams -msaa 4
65 vcaps -polygonMode 1
66 vdump $imagedir/${casename}_persp_polmode_msaa.png
67
68 vcaps -polygonMode 0
69 vdump $imagedir/${casename}_persp_glsl_msaa.png