1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
occt/tests/v3d/glsl/phong_couple
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

31 lines
524 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
box b 2 0 0 1 0.5 0.25
# draw box
vinit View1
vclear
vdefaults -absDefl 0.5
vsetdispmode 1
vaxo
vdisplay f
vfit
vrotate -0.5 0.0 0.0
vdisplay b
vfit
# take snapshot with fixed pipeline
vdump $::imagedir/${::casename}_OFF.png
vshaderprog f phong
vshaderprog b phong
vshaderprog b off
vrotate -0.2 0.0 0.0
vmoveto 100 100
vdump $::imagedir/${::casename}_ph1.png