0024437: Visualization - silhouette edges based on OpenGL
authorasl <asl@opencascade.com>
Wed, 27 Feb 2019 22:36:32 +0000 (01:36 +0300)
committerapn <apn@opencascade.com>
Thu, 28 Feb 2019 17:25:51 +0000 (20:25 +0300)
commit6ef0d6f1567d2291386543de7bd8c568cbefbd11
treec214bf1ea24c6de4b15efcf789f2d13438ac044b
parent967d2f4f301c079f3cbe689d88dad155bae2dada
0024437: Visualization - silhouette edges based on OpenGL

Added new flag Graphic3d_AspectFillArea3d::ToDrawSilhouette() activating silhouette (outline) rendering.

The new feature can simulate fake HLR look-n-feel,
when combined with Aspect_IS_HIDDENLINE interior style (filling object with background color),
face boundary edges (with most continuity flag set to c2 or lower).

Silhouette GLSL program is very simple - it displaces model alongside vertex normal,
so that it is applicable only to smooth surfaces and closed volumes,
and produces visual artifacts at sharp corners, especially when face boundary is disabled.

OpenGl_SetOfShaderPrograms has been modified so that to reduce
dimensions of the grid of static size based on amount of program combinations.

OpenGl_PrimitiveArray no more allocates VBO resources if primitive array
is marked to be not drawn via interior style / line type / marker type.
12 files changed:
src/Graphic3d/Graphic3d_AspectFillArea3d.cxx
src/Graphic3d/Graphic3d_AspectFillArea3d.hxx
src/OpenGl/OpenGl_BackgroundArray.cxx
src/OpenGl/OpenGl_PrimitiveArray.cxx
src/OpenGl/OpenGl_SetOfShaderPrograms.hxx
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_ShaderManager.hxx
src/OpenGl/OpenGl_ShaderProgram.cxx
src/OpenGl/OpenGl_ShaderProgram.hxx
src/ViewerTest/ViewerTest.cxx
tests/v3d/glsl/outline1 [new file with mode: 0644]
tests/v3d/glsl/outline2 [new file with mode: 0644]