1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-07 18:30:55 +03:00
occt/tests/v3d/glsl/phong_fuse2
osa 4c5133866b 0023200: Visualization - prevent multiple triangulating of a shape that already has been triangulated
Add new flag IsAutoTriangulated to Prs3d_Drawer. It is True by default.
If this flag is True automatic re-triangulation with deflection-check logic will be applied.
Else this feature will be disable and triangulation is expected to be computed by application itself.

Change the syntax of vdefalts command.
Add new parameter -autoTriang for check of AutoTriangulated functionality.

Adjust camera position in test case bugs/xde/bug23969
2015-03-05 14:49:32 +03:00

40 lines
767 B
Plaintext

puts "========"
puts "Per-pixel lighting using GLSL program (Phong shading)"
puts "========"
# import model
restore [locate_data_file occ/fuse.brep] f
tclean f
# draw box
vinit View1
vclear
vdefaults -absDefl 0.5
vsetdispmode 1
vaxo
vdisplay f
vfit
vrotate -0.5 0.0 0.0
vfit
# setup lights
vlight delete 0
vlight delete 0
vlight delete 0
vlight delete 0
vlight delete 0
vlight add ambient color WHITE
vlight add directional dir 1 0 0 color GREEN headlight 1
vlight add directional dir -1 0 0 color RED1 headlight 1
# take snapshot with fixed pipeline
vdump $::imagedir/${::casename}_OFF.png
vshaderprog f phong
vdump $::imagedir/${::casename}_ph1.png
vclear
vdisplay f
vshaderprog f phong
vdump $::imagedir/${::casename}_ph2.png
vmoveto 250 250