mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
Graphic3d_TypeOfShaderObject enumeration has been extended by Geometry shader object type. OpenGl_ShaderProgram::Initialize() processes new shader object types when supported by OpenGL version. Declarations.glsl has been fixed so that occFragColor is defined only for Fragment Shader object only (by handling new FRAGMENT_SHADER macros). Improved documentation of Graphic3d_ArrayOfPrimitives class. vshader Draw Harness command has been extended to support definition of Shader Object types other than Vertex and Fragment shader.
32 lines
535 B
Plaintext
32 lines
535 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
|
|
vclear
|
|
vclose ALL
|
|
vinit View1
|
|
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
|