MantisBT - Open CASCADE
View Issue Details
0029076Open CASCADE[OCCT] OCCT:Visualizationpublic2017-09-02 22:552019-03-05 13:51
kgv 
apn 
normalfeature 
verifiedfixed 
 
[OCCT] 7.4.0* 
v3d glsl interior
0029076: Visualization - implement element shrinking Shader
It is desired having a GLSL program implementing Element shrinking presentation, which would not require duplicating vertex data (and providing better flexibility - like dynamic shrink scaling and shrinking by size fixed in pixels).

This would require Geometry Shader support.

Implementing triangle shrinking is relatively straightforward task. At the same time, shrinking quads is not, because quads can not be given to Geometry Shader as input.

First possible approach would be passing GL_LINE_STRIP_ADJACENCY (which defines 4 vertices for Geometry Shader input) so that input data in Primitive Array will represent array of quads and Geometry Shader will be able shrinking it as whole. This means that prepared Primitive Array can be rendered as not shrunk quads only using additional dedicated Geometry Shader, affecting performance (but reducing index data).

Second possible approach would be defining a special Geometry Shader which would align shrunk triangle onto quad diagonal defined as first vertices of triangle. This means that Quads should be split into triangles in a special way (Quad: 1234 -> Tri1: 321; Tri2: 134), however Primitive Array can be rendered as usual triangles if needed.

In both cases shrinked rendering of mixed triangulation/quads data would require splitting data in two Primitive Arrays, while currently mixed data is rendered within single triangulation Primitive Array.
testgrid bugs vis bug29076

pload VISUALIZATION
vclear
vinit
vaxo
vdrawparray p 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
vsetinteriorstyle p 1 -quads 1 -edgeColor RED -edgeWidth 4
vfit
Displaying mesh edges is a common approach in mesh structure analysis and in visualization debugging task.

There are 3 possible implementations:
1) glPolygonMode(), unavailable on OpenGL ES.
2) filling dedicated GL_LINES array.
3) GLSL program.

Historically OCCT provides Aspect_IS_HOLLOW interior style for this purpose, which was implemented as glPolygonMode(GL_FRONT_AND_BACK, GL_LINE).
Each solution has its cons and pros:

1) glPolygonMode.
CONS:
- Unavailable on OpenGL ES.
- Fixed line width (1 pixel) on OpenGL, Core Profile.
- Rendering interior + mesh edges requires 2 passes.
- Hardware might render edges shared between triangle twice, reducing performance.
- Wide lines are rendered with visual artifacts.
- Triangles only.
PROS:
- Easy to switch on.
- Line width in pixels.

2) Dedicated GL_LINES array.
CONS:
- Extra memory footprint for additional data.
- Presentation data should be recomputed.
- The same limitations with line width as glPolygonMode
  (1 pixel width with Core Profile, visual artifacts on wide lines).
PROS:
- Better performance than glPolygonMode(),
  because only unique triangle edges are drawn.
- Can be computed for arbitrary polygons (triangles/quads/polygons).

3) GLSL program.
CONS:
- Requires Geometry Shader stage,
  which is available only since OpenGL ES 3.2+ and OpenGL 3.2+,
  and executed considerably slow on hardware
  (even dummy pass-through Geometry Shader drops performance).
- Variable line width,
  becoming twice thicker on edges shared between triangles.
- Visually hollow presentation without AntiAliasing
  might look not that good as normal GL_LINES.
PROS:
- Arbitrary line width,
  no limitation within Core Profile,
  no artifacts on wide lines.
- Variable line width,
  becoming thinner at large camera distance;
  this avoids mesh becoming a solid mess at distance.
- Rendering interior + mesh edges presentation in single pass.
- Shrinking element presentation (as transparent mesh edges).
- Triangles and quads edges;
  quads should be split into triangles in specific edges order.
- Switching on the fly without recomputing presentation,
  as in case of glPolygonMode().
- Smooth mesh edges on top of interior without AntiAliasing.

This patch implements and enables 3rd approach by default, providing a good compromise between performance, functionality and simplicity to activate.
glPolygonMode() remains available on desktop OpenGL and can be enabled via OpenGl_Caps::usePolygonMode, while 2nd approach should be implemented at application level.
No tags attached.
related to 0029074closed bugmaster Open CASCADE Visualization, TKOpenGl - support Geometry Shader definition 
related to 0030119verified apn Open CASCADE Visualization, OpenGl_ShaderManager - implement mechanism generating in/out section of shader programs 
? shrink_quad.svg (13,886) 2017-09-02 22:55
https://tracker.dev.opencascade.org/
png shrink_triangle.png (48,972) 2017-09-02 22:55
https://tracker.dev.opencascade.org/
png shrink_quad.png (78,570) 2017-09-02 22:55
https://tracker.dev.opencascade.org/
txt geomShader.txt (5,276) 2018-07-16 17:29
https://tracker.dev.opencascade.org/
png edge_think.png (10,190) 2018-07-17 12:55
https://tracker.dev.opencascade.org/
png bug29076.png (89,697) 2018-10-11 11:17
https://tracker.dev.opencascade.org/
png interior1_persp_glsl_msaa.png (96,992) 2019-02-20 19:45
https://tracker.dev.opencascade.org/
png interior2_persp_glsl_msaa.png (28,600) 2019-02-20 19:45
https://tracker.dev.opencascade.org/
Issue History
2017-09-02 22:55kgvNew Issue
2017-09-02 22:55kgvAssigned To => kgv
2017-09-02 22:55kgvFile Added: shrink_quad.svg
2017-09-02 22:55kgvFile Added: shrink_triangle.png
2017-09-02 22:55kgvFile Added: shrink_quad.png
2017-09-02 22:55kgvRelationship addedrelated to 0029074
2018-06-27 12:16kgvAssigned Tokgv => mnv
2018-06-27 12:16kgvStatusnew => assigned
2018-07-16 17:16mnvFile Added: geomShader.gs
2018-07-16 17:22mnvNote Added: 0077683
2018-07-16 17:28mnvFile Deleted: geomShader.gs
2018-07-16 17:29mnvFile Added: geomShader.txt
2018-07-17 12:55kgvFile Added: edge_think.png
2018-08-03 10:51gitNote Added: 0078340
2018-08-03 11:56gitNote Added: 0078347
2018-08-03 12:16mnvFile Added: bug29076_combined.png
2018-08-03 12:16mnvFile Added: bug29076_shrunk.png
2018-08-03 12:16mnvFile Added: bug29076_wireframe.png
2018-08-03 13:48gitNote Added: 0078352
2018-08-03 14:04gitNote Added: 0078354
2018-08-03 16:33gitNote Added: 0078365
2018-08-06 10:33gitNote Added: 0078415
2018-08-06 10:55gitNote Added: 0078417
2018-08-06 13:49gitNote Added: 0078421
2018-08-06 14:00gitNote Added: 0078422
2018-08-06 16:23mnvNote Added: 0078429
2018-08-06 16:23mnvAssigned Tomnv => kgv
2018-08-06 16:23mnvStatusassigned => resolved
2018-08-06 16:23mnvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19659#r19659
2018-08-06 18:58kgvNote Added: 0078442
2018-08-06 18:58kgvAssigned Tokgv => mnv
2018-08-06 18:58kgvStatusresolved => assigned
2018-08-07 09:32kgvRelationship addedrelated to 0030022
2018-08-07 11:19gitNote Added: 0078452
2018-08-07 11:20gitNote Added: 0078453
2018-08-09 11:04mnvFile Deleted: bug29076_combined.png
2018-08-09 11:04mnvFile Deleted: bug29076_wireframe.png
2018-08-09 11:04mnvFile Deleted: bug29076_shrunk.png
2018-08-09 11:04mnvFile Added: bug29076.png
2018-08-09 11:10gitNote Added: 0078519
2018-08-14 21:59kgvNote Added: 0078617
2018-08-14 23:40kgvNote Added: 0078618
2018-08-14 23:42kgvNote Edited: 0078618bug_revision_view_page.php?bugnote_id=78618#r19739
2018-08-17 15:51mnvFile Deleted: bug29076.png
2018-08-17 15:51mnvFile Added: bug29076.png
2018-08-20 09:13gitNote Added: 0078685
2018-08-20 09:15gitNote Added: 0078686
2018-08-20 13:47gitNote Added: 0078688
2018-08-20 14:25gitNote Added: 0078689
2018-08-20 14:32gitNote Added: 0078690
2018-08-20 14:33gitNote Added: 0078691
2018-08-28 09:31gitNote Added: 0078806
2018-08-31 17:18gitNote Added: 0078900
2018-09-05 16:14gitNote Added: 0079001
2018-09-05 19:02gitNote Added: 0079007
2018-09-05 19:02mnvNote Added: 0079008
2018-09-05 19:02mnvAssigned Tomnv => kgv
2018-09-05 19:02mnvStatusassigned => resolved
2018-09-05 19:07sanNote Added: 0079009
2018-09-06 10:50kgvNote Added: 0079010
2018-09-06 10:50kgvAssigned Tokgv => mnv
2018-09-06 10:50kgvStatusresolved => assigned
2018-09-10 14:44gitNote Added: 0079086
2018-09-10 15:34gitNote Added: 0079088
2018-09-11 09:40gitNote Added: 0079110
2018-09-27 09:23gitNote Added: 0079430
2018-10-09 09:27mnvRelationship addedrelated to 0030220
2018-10-09 17:54gitNote Added: 0079828
2018-10-10 08:32gitNote Added: 0079833
2018-10-10 08:45gitNote Added: 0079834
2018-10-10 10:03gitNote Added: 0079836
2018-10-10 12:18gitNote Added: 0079848
2018-10-11 10:24gitNote Added: 0079873
2018-10-11 11:17mnvFile Deleted: bug29076.png
2018-10-11 11:17mnvFile Added: bug29076.png
2018-10-11 11:20gitNote Added: 0079876
2018-10-11 14:25gitNote Added: 0079890
2018-10-12 11:16mnvNote Added: 0079910
2018-10-12 11:16mnvAssigned Tomnv => kgv
2018-10-12 11:16mnvStatusassigned => resolved
2018-10-15 15:57gitNote Added: 0079966
2018-10-16 15:14gitNote Added: 0080017
2018-10-17 16:37gitNote Added: 0080064
2018-10-17 17:36gitNote Added: 0080069
2018-10-22 23:45kgvRelationship addedrelated to 0030119
2018-10-22 23:46kgvNote Added: 0080211
2018-10-22 23:46kgvAssigned Tokgv => mnv
2018-10-22 23:46kgvStatusresolved => feedback
2018-10-23 15:01gitNote Added: 0080231
2018-10-24 08:23gitNote Added: 0080245
2018-10-24 10:53mnvNote Added: 0080252
2018-10-24 10:53mnvAssigned Tomnv => kgv
2018-10-24 10:53mnvStatusfeedback => resolved
2018-12-13 12:29gitNote Added: 0081506
2018-12-13 15:33mnvNote Added: 0081515
2018-12-18 10:50gitNote Added: 0081545
2018-12-18 10:51gitNote Added: 0081546
2018-12-18 13:56mnvNote Added: 0081551
2019-02-14 12:05bugmasterProjectInternal => Open CASCADE
2019-02-14 19:13gitNote Added: 0082184
2019-02-14 20:05gitNote Added: 0082185
2019-02-14 20:17gitNote Added: 0082186
2019-02-14 20:27gitNote Added: 0082187
2019-02-14 20:50gitNote Added: 0082188
2019-02-14 23:41gitNote Added: 0082189
2019-02-15 09:58kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20673#r20673
2019-02-19 00:04gitNote Added: 0082216
2019-02-19 01:52gitNote Added: 0082217
2019-02-19 02:03gitNote Added: 0082218
2019-02-19 17:50gitNote Added: 0082225
2019-02-19 19:45gitNote Added: 0082226
2019-02-19 19:48gitNote Added: 0082227
2019-02-19 20:36gitNote Added: 0082228
2019-02-19 21:37gitNote Added: 0082229
2019-02-19 21:51gitNote Added: 0082230
2019-02-19 22:22gitNote Added: 0082231
2019-02-19 22:58gitNote Added: 0082232
2019-02-20 09:59gitNote Added: 0082234
2019-02-20 12:11gitNote Added: 0082238
2019-02-20 18:38gitNote Added: 0082240
2019-02-20 19:44kgvFile Added: interior1_persp_glsl_msaa.png
2019-02-20 19:44kgvFile Added: interior2_persp_glsl_msaa.png
2019-02-20 19:45kgvFile Deleted: interior1_persp_glsl_msaa.png
2019-02-20 19:45kgvFile Deleted: interior2_persp_glsl_msaa.png
2019-02-20 19:45kgvFile Added: interior1_persp_glsl_msaa.png
2019-02-20 19:45kgvFile Added: interior2_persp_glsl_msaa.png
2019-02-20 20:07kgvNote Added: 0082242
2019-02-20 20:07kgvAssigned Tokgv => bugmaster
2019-02-20 20:07kgvStatusresolved => reviewed
2019-02-20 21:51gitNote Added: 0082243
2019-02-20 22:23kgvAdditional Information Updatedbug_revision_view_page.php?rev_id=20690#r20690
2019-02-20 22:24kgvAdditional Information Updatedbug_revision_view_page.php?rev_id=20691#r20691
2019-02-20 22:26kgvAdditional Information Updatedbug_revision_view_page.php?rev_id=20692#r20692
2019-02-21 17:03apnTest case number => v3d glsl interior
2019-02-21 17:03apnNote Added: 0082278
2019-02-21 17:03apnStatusreviewed => tested
2019-02-22 11:07gitNote Added: 0082293
2019-02-22 12:18kgvNote Added: 0082296
2019-02-23 13:56apnChangeset attached => occt master 2a332745
2019-02-23 13:56apnAssigned Tobugmaster => apn
2019-02-23 13:56apnStatustested => verified
2019-02-23 13:56apnResolutionopen => fixed
2019-03-05 13:46gitNote Added: 0082610
2019-03-05 13:46gitNote Added: 0082611
2019-03-05 13:46gitNote Added: 0082612
2019-03-05 13:46gitNote Added: 0082613
2019-03-05 13:46gitNote Added: 0082614
2019-03-05 13:48gitNote Added: 0082657
2019-03-05 13:48gitNote Added: 0082658
2019-03-05 13:48gitNote Added: 0082659
2019-03-05 13:48gitNote Added: 0082660
2019-03-05 13:48gitNote Added: 0082661
2019-03-05 13:48gitNote Added: 0082662
2019-03-05 13:48gitNote Added: 0082663
2019-03-05 13:48gitNote Added: 0082664
2019-03-05 13:48gitNote Added: 0082665
2019-03-05 13:48gitNote Added: 0082666

Notes
(0077683)
mnv   
2018-07-16 17:22   
Uploaded geomShader.gs source code for geometry shader. If figure is shrinked in window coordinate the shrink value is correct, but in time of rotation produced wrong result(shrinkTrianglePix() method in shader). If figure is shrinked in model coordinates the shrink value is wrong, but rotation operations is correct(shrinkTriangle() method in shader).
(0078340)
git   
2018-08-03 10:51   
Branch CR29076 has been created by mnv.

SHA-1: 4e86f3d336dac13820172f9a71ef5ed062ca27ce


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Added new Interior style:
    - SHRINKED: show shrinked triangulation
    - COMBINED: show solid and wireframe
    HOLLOW, SHRINKED and COMBINED interior styles are drawing by shader program with geometry shader.
    Added new parameter for vaspects command:
    [-setWireframeWidth LineWidth] - this command used for set width of wireframe line for new interior styles.
    And added new alias vsetwfwidth for new parameter.
(0078347)
git   
2018-08-03 11:56   
Branch CR29076 has been updated forcibly by mnv.

SHA-1: 0541152a928d70fa8fb5bfd2bd69c0c03bbba90d
(0078352)
git   
2018-08-03 13:48   
Branch CR29076 has been updated forcibly by mnv.

SHA-1: d8c873a6d5d3bd32de9411c4e22b9b4d900e5181
(0078354)
git   
2018-08-03 14:04   
Branch CR29076 has been updated forcibly by mnv.

SHA-1: bfd000869ad735514c6401fdb34fdf064ba7112c
(0078365)
git   
2018-08-03 16:33   
Branch CR29076_1 has been created by mnv.

SHA-1: 3e57eb14d4a6307f600f9552a5a5f7615b784b5b


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Hollow interior style was renamed to Wireframe.
    Added new Interior style:
    - Shrunk: show shrunk triangulation
    - Combined: show solid and wireframe
    Wireframe, Shrunk and Combined interior styles are drawing by shader program with geometry shader.
    Added new parameters for vaspects command:
    [-setWireframeWidth LineWidth] - set width of wireframe line for new interior styles.
    [-unsetWireframeWidth] - set width of wireframe line to default value.
    And added new aliases vsetwfwidth and vunsetwfwidth for new parameters.
    Updated vsetinteriorstyle command.
(0078415)
git   
2018-08-06 10:33   
Branch CR29076_1 has been updated forcibly by mnv.

SHA-1: 0b42ba6ae5dc06082c55e062b8fa9a11bf85fcc1
(0078417)
git   
2018-08-06 10:55   
Branch CR29076_1 has been updated forcibly by mnv.

SHA-1: a0691cc4bb8249a4b8c3cb462df610dd472697e7
(0078421)
git   
2018-08-06 13:49   
Branch CR29076_1 has been updated forcibly by mnv.

SHA-1: be331ed2597c86f54277d9a5e72a0913859ea5a7
(0078422)
git   
2018-08-06 14:00   
Branch CR29076_1 has been updated forcibly by mnv.

SHA-1: d209c1a84f1d246388d547ddf6e276e0c575b1e5
(0078429)
mnv   
2018-08-06 16:23   
Patch is ready for review
http://jenkins-test-11.nnov.opencascade.com:8080/view/CR29076-master-MNV/view/ALL/ [^]
(0078442)
kgv   
2018-08-06 18:58   
+//! IS_SHRINKED   display shrunk triangulation of surface.
...
+Aspect_IS_SHRUNK,

Please move description of enumeration values to their location.
It might be better naming this value Aspect_IS_SHRINK.
(0078452)
git   
2018-08-07 11:19   
Branch CR29076_2 has been created by mnv.

SHA-1: 9b4afd3d309f52092004a063562cb9efeb25b44c


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Added new Interior style:
    - Shrink: display shrunk triangulation of surface
    - Solid Wireframe: display boundaries and surface
    Hollow, Shrink and Solid Wireframe interior styles are drawing by shader program with geometry shader.
    Added new parameters for vaspects command:
    [-setWireframeWidth LineWidth] - set width of wireframe line for new interior styles.
    [-unsetWireframeWidth] - set width of wireframe line to default value.
    And added new aliases vsetwfwidth and vunsetwfwidth for new parameters.
    Updated vsetinteriorstyle command.
(0078453)
git   
2018-08-07 11:20   
Branch CR29076_1 has been updated by mnv.

SHA-1: adc133b300d5dab7fc188bc99b38492d4ce6d698


Detailed log of new commits:

Author: mnv
Date: Tue Aug 7 11:14:13 2018 +0300

    Udated aspects enumeration description.

(0078519)
git   
2018-08-09 11:10   
Branch CR29076_2 has been updated forcibly by mnv.

SHA-1: bc63cd54effa5d947472a59431e01e0e540d0788
(0078617)
kgv   
2018-08-14 21:59   
--- a/src/OpenGl/OpenGl_Text.cxx
+++ b/src/OpenGl/OpenGl_Text.cxx
+  OpenGl_AspectFace anAspect;
+  anAspect.Aspect()->SetAlphaMode(Graphic3d_AlphaMode_Opaque);
   theCtx->ShaderManager()->BindFaceProgram (Handle(OpenGl_TextureSet)(), Graphic3d_TOSM_UNLIT,

-                                            Graphic3d_AlphaMode_Opaque, Standard_False, Standard_False,

+                                            anAspect.Aspect(), Standard_False, Standard_False,

This is unacceptable creating OpenGl_AspectFace for such purpose.

--- a/src/Graphic3d/Graphic3d_AspectFillArea3d.hxx
+++ b/src/Graphic3d/Graphic3d_AspectFillArea3d.hxx
   Aspect_TypeOfLine            myEdgeType;
   Standard_ShortReal           myEdgeWidth;
   Handle(Graphic3d_HatchStyle) myHatchStyle;
+  Standard_Integer             myWireframeWidth;

myEdgeWidth is not enough or it is used for another purpose?

-    Standard_Integer aBits = getProgramBits (theTextures, theAlphaMode, theHasVertColor, false);
+    Standard_Integer aBits = getProgramBits(theTextures, theAlphaMode, theHasVertColor, false);

Unrelated changes should be avoided.

-                                   Graphic3d_AlphaMode theAlphaMode,
+                                   const Graphic3d_AlphaMode theAlphaMode,

This change makes no sense.

+    switch (theAspect->InteriorStyle())
+    {
+    case Aspect_IS_HOLLOW:

Broken indentation for cases.

+  Standard_Boolean BindFaceProgram (const Handle(OpenGl_TextureSet)&          theTextures,
+    myWireframeWidth = theAspect->WireframeWidth();
+    myWireframeColor = theAspect->EdgeColor();

It doesn't look consistent to management of other properties.

+    theProgram->SetUniform(myContext, aLocViewPort, aViewport);
+  }
+  
+  const GLint aLocLineWidth = theProgram->GetUniformLocation(myContext, "occLineWidth");


Please avoid trailing spaces.

+  const GLint aLocViewPort = theProgram->GetUniformLocation(myContext, "occViewport");

+  const GLint aLocLineWidth = theProgram->GetUniformLocation(myContext, "occLineWidth");

+  const GLint aLocWireframeColor = theProgram->GetUniformLocation(myContext, "occWireframeColor");


These are expected to be cached within OpenGl_ShaderProgram.

occLineWidth

Make sure this is properly multiplied by rendering resolution (see OpenGl_Context::SetLineWidth()).
Check rendering with non-standard rendering scale (vrenderparams -rendScale and -resolution).

+        EOL"THE_SHADER_IN  vec4 VertColorVS[];"
+        EOL"THE_SHADER_OUT vec4 VertColorFS;" : "")

You may use shorter "in" and "out" within GLSL130+ Shaders (which Geometry Shaders require anyway) instead of THE_SHADER_IN/THE_SHADER_OUT intended for compatibility with old OpenGL 2.1.

+  const Standard_Boolean  isUseGeomShader  = theBits & OpenGl_PO_HollowMode || 
+                                             theBits & OpenGl_PO_ShrinkMode || 
+                                             theBits & OpenGl_PO_SolidWFMode;

toUseGeomShader.

-    aSrcVertExtraOut  += EOL"THE_SHADER_OUT vec4 VertColor;";
-    aSrcVertExtraMain += EOL"  VertColor = occVertColor;";
-    aSrcFragExtraOut  += EOL"THE_SHADER_IN  vec4 VertColor;";
-    aSrcFragGetColor  =  EOL"vec4 getColor(void) { return VertColor; }";
+    if (isUseGeomShader)
+    {
+      aSrcVertExtraOut  += EOL"THE_SHADER_OUT vec4 VertColorVS;";
+      aSrcVertExtraMain += EOL"  VertColorVS = occVertColor;";
+      aSrcFragExtraOut  += EOL"THE_SHADER_IN  vec4 VertColorFS;";
+      aSrcFragGetColor   = EOL"vec4 getColor(void) { return VertColorFS; }";
+    }
+    else
+    {
+      aSrcVertExtraOut  += EOL"THE_SHADER_OUT vec4 VertColor;";
+      aSrcVertExtraMain += EOL"  VertColor = occVertColor;";
+      aSrcFragExtraOut  += EOL"THE_SHADER_IN  vec4 VertColor;";
+      aSrcFragGetColor   = EOL"vec4 getColor(void) { return VertColor; }";
+    }

Using macros for in/out attributes coming from/to vertex/fragment/geometric shader, or introducing some custom preprocessor, should be better then duplicating big portions of code.

+  const Standard_Boolean isUseGeomShader = theBits & OpenGl_PO_HollowMode ||
+                                           theBits & OpenGl_PO_ShrinkMode ||
+                                           theBits & OpenGl_PO_SolidWFMode;

It doesn't look like code properly checks that GL context supports Geometric Shaders in advance leading to potential misbehavior.
Please add checks and verify code (you may add early out at various points-GL versions within OpenGl_Context::Init() as fast check; in addition, you may execute program using Mesa software implementation within Compatibility Profile or/and on Android devices limited by OpenGL ES 2.0 features).
(0078618)
kgv   
2018-08-14 23:40   
(edited on: 2018-08-14 23:42)
Declare input/output variables using interface blocks (when Geometry Shader is used), so that to keep same names across stages like this:

# Vertex Shader - nameless instance
out VertexData
{
  vec4 VertColor;
};
void main()
{
  VertColor = occColor;
  gl_Position = occVertex;
}


# Geometry Shader - two named instances for input (array) and output
layout(triangles) in;
layout(triangle_strip, max_vertices=3) out;
in VertexData
{
  vec4 VertColor;
} geomIn[3];

out VertexData
{
  vec4 VertColor;
} geomOut;
void main()
{
  mat4 aMat = occProjectionMatrix * occWorldViewMatrix * occModelWorldMatrix;
  for (int aTriVertIter = 0; aTriVertIter < 3; ++aTriVertIter)
  {
    gl_Position = aMat * gl_in[aTriVertIter].gl_Position;
    geomOut.VertColor = geomIn[aTriVertIter].VertColor;
    EmitVertex();
  }
  EndPrimitive();
}


# Fragment Shader - nameless instance
in VertexData
{
  vec4 VertColor;
};
void main()
{
  occFragColor = VertColor;
}


(0078685)
git   
2018-08-20 09:13   
Branch CR29076_3 has been created by mnv.

SHA-1: 5aa406dce16934ca06b85df31671e023ce6f5c73


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Added new Interior styles:
    - Shrink: display shrunk triangulation of surface
    - Solid Wireframe: display boundaries and surface
    Hollow, HiddenLine, Shrink and Solid Wireframe interior styles are drawing by shader program with geometry shader.
    Added new parameter for vsetedgetype command:
    [-width] - set width of wireframe line.
    Updated vsetinteriorstyle command.
    Updated behaviour of vsetedgetype command.
(0078686)
git   
2018-08-20 09:15   
Branch CR29076_2 has been updated forcibly by mnv.

SHA-1: 7ec9ff6da893d77d5d87e09c5e9c3fb2a3ea394b
(0078688)
git   
2018-08-20 13:47   
Branch CR29076_3 has been updated forcibly by mnv.

SHA-1: 153846f7c2530a84746f508d4ff5b9cdd1f5f7fd
(0078689)
git   
2018-08-20 14:25   
Branch CR29076_3 has been updated forcibly by mnv.

SHA-1: 6679e92105bc3c706c062bc29c48f43750141c9f
(0078690)
git   
2018-08-20 14:32   
Branch CR29076_4 has been created by mnv.

SHA-1: 6679e92105bc3c706c062bc29c48f43750141c9f


No new revisions were added by this update.
(0078691)
git   
2018-08-20 14:33   
Branch CR29076_4 has been deleted by mnv.

SHA-1: 6679e92105bc3c706c062bc29c48f43750141c9f
(0078806)
git   
2018-08-28 09:31   
Branch CR29076_4 has been created by mnv.

SHA-1: b9870f07075d49f483fe74a7f84affb9244c0540


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Added new Interior styles:
    - Shrink: display shrunk triangulation of surface
    - Solid Wireframe: display boundaries and surface
    Hollow, HiddenLine, Shrink and Solid Wireframe interior styles are drawing by shader program with geometry shader.
    Added new parameter for vsetedgetype command:
    [-width] - set width of wireframe line.
    Updated vsetinteriorstyle command.
    Updated behaviour of vsetedgetype command.

Author: mnv
Date: Fri Aug 24 14:08:53 2018 +0300

    Added camera scale for shrunk display mode.

Author: mnv
Date: Mon Aug 27 16:49:58 2018 +0300

    Added new inerior style for scalability shrunk presentation.
    Added quad presentation mode.
(0078900)
git   
2018-08-31 17:18   
Branch CR29076_5 has been created by mnv.

SHA-1: cd0d6aee23a874e5e85185303f5c58e605656243


No new revisions were added by this update.
(0079001)
git   
2018-09-05 16:14   
Branch CR29076_5 has been updated forcibly by mnv.

SHA-1: 71deb242a651ab3582dbc1b79b4ef14cfa701613
(0079007)
git   
2018-09-05 19:02   
Branch CR29076_5 has been updated forcibly by mnv.

SHA-1: 37de0c07122b484a7aa3613b235eafc0b72933e9
(0079008)
mnv   
2018-09-05 19:02   
Patch is ready for review.
(0079009)
san   
2018-09-05 19:07   
Is it possible to have few up-to-date screenshots attached to the issue, with different scene zoom factors - to evaluate rendering quality and behavior with respect to zooming?
(0079010)
kgv   
2018-09-06 10:50   
+  void SetScaleFactor (const Standard_Real theScaleFactor)
+  {
+    myScaleFactor = (float)theScaleFactor;
+  }

Why Standard_Real?

+  //! Returns true if advanced shading is on (true by default).
+  Standard_Boolean IsAdvancedShading() const { return myIsAdvancedShading; }

The property name and description is confusing.

+  //! Returns true if quad presentation is on (false by default).
+  bool IsQuadMode() const { return myIsQuadMode; }

What it is supposed to mean?

   bool                    myToMapTexture;
+  Standard_ShortReal      myScaleFactor;
+  Standard_Boolean        myIsQuadMode;

Please reorder fields for better packing.

-  Graphic3d_TypeOfLimit_NB                              //!< number of elements in this enumeration

+  Graphic3d_TypeOfLimit_NB,                             //!< number of elements in this enumeration

+  Graphic3d_TypeOfLimit_HasShrunkPrs                    //!< indicates whether shrunk presentation 
is supported

Please read description of _NB enumeration value before adding new values.

--- a/src/OpenGl/OpenGl_Context.hxx
+++ b/src/OpenGl/OpenGl_Context.hxx
@@ -784,6 +784,9 @@ public: //! @name methods to alter or retrieve current state
     myLineWidthScale  = Max (1.0f, std::floor (theRatio + 0.5f));
   }
 
+  //! Return scale factor for line width.
+  Standard_ShortReal LineWidthScale() const { return myLineWidthScale; }

Usually get-ter is expected to precede set-ter.

+    case Graphic3d_TypeOfLimit_HasShrunkPrs:
+      return aCtx->IsGlGreaterEqual (3, 2);

Doesn't look correct.

+  OpenGl_PO_PixelShrinkMode = 0x2000,  //!< pixel shrunk triangulation display mode
+  OpenGl_PO_SolidWFMode     = 0x4000,  //!< solid wireframe display mode
+  OpenGl_PO_HiddenLine      = 0x8000,  //!< removed hidden lines display mode
+  OpenGl_PO_ScaleShrinkMode = 0x10000, //!< scalability shrunk triangulation display mode

These are used as enumeration, not as bit flags which can be combined together.
Please define it as dedicated enumeration and add a bitmask to cover its values.

+// =======================================================================
+// function : prepareEdgeDistString
+// purpose  : Auxiliary function for prepareGeomSrc function
+// =======================================================================
+TCollection_AsciiString prepareEdgeDistString (const Standard_Integer& theTriVertIter)

Why Standard_Integer& ? It also looks like "static" is missing.
Please use normal //! doxygen syntax for describing function in place of its declaration.

+// =======================================================================
+// function : prepareGeomSrc
+// purpose  :
+// =======================================================================
+TCollection_AsciiString OpenGl_ShaderManager::prepareGeomMainSrc (const OpenGl_ShaderVarList& theVarList,


Inconsistent header.

+          EOL"    for (int aTriVertIter = 0; aTriVertIter < 3; ++aTriVertIter)"
+          EOL"    {"
+          EOL"      aCenter += gl_in[aTriVertIter].gl_Position.xyz;"
+          EOL"    }"
+          EOL"    aCenter /= 3.0;"

Looks like it is simpler unrolling loop in source code.

+  TCollection_AsciiString aSrcMainGeom = TCollection_AsciiString()
+    + ((theBits & OpenGl_PO_ScaleShrinkMode) != 0
+        ? EOL"void main()"

The block looks too big for ternary operator - consider using if/else instead.

+          EOL"  vec3 aWinCoord = theVec.xyz / theVec.w;"
+          EOL"  aWinCoord   = aWinCoord * 0.5 + 0.5;"
+          EOL"  aWinCoord.x = aWinCoord.x * occViewport[0] + occViewport[2];"
+          EOL"  aWinCoord.y = aWinCoord.y * occViewport[1] + occViewport[3];"
+          EOL"  return aWinCoord;"

Consider writing this in a single line.

+  const Standard_Boolean  toUseGeomShader  = myContext->IsGlGreaterEqual(3, 2) && (theBits 
& OpenGl_PO_AdvShading) != 0;

If I understand the purpose of OpenGl_PO_AdvShading flag, it should be within global Caps, not within GLSL program bits.

+        EOL"  Normal = normalize (cross (dFdx (Position.xyz / Position.w), dFdy (Position.xyz / 
Position.w)));"//;

//;

+//! List of variable of shader program.
+typedef NCollection_Vector<TCollection_AsciiString> OpenGl_ShaderVarList;

Why it is a vector, not a sequence?
Looks like misused collection basing on context.

+    if (myContext->SampleAlphaToCoverage())
+    {
+      theBits |= OpenGl_PO_MSAA;

So why a bit flag is called "MSAA", while it has a different meaning?

+  Standard_EXPORT void SetAspects (const Standard_ShortReal& theWireframeWidth,
+                                   const OpenGl_Vec3&        theWireframeColor,
+                                   const Standard_ShortReal& theScaleFactor,

"const Standard_ShortReal&" doesn't make sense for primitive types.

+  Standard_EXPORT void SetViewport (const OpenGl_Vec4& theViewport) { myViewport = theViewport; 
}
+  Standard_EXPORT Standard_ShortReal WireframeWidth() const { return myWireframeWidth; }
+  Standard_EXPORT const OpenGl_Vec3& WireframeColor() const { return myWireframeColor; }
...
>> other places <<

Inline methods should not be exported from DLL.

+  Standard_ShortReal myWireframeWidth; //!< wireframe width
+  OpenGl_Vec3        myWireframeColor; //!< wireframe color
+  OpenGl_Vec4        myViewport;       //!< viewport properties
+  Standard_ShortReal myScaleFactor;    //!< scale factor for shrunk presentation

Consider reordering fields.

+  aManager->SetWireframeViewportState (OpenGl_Vec4 ((float)aContext->Viewport()[2], 
+                                                    (float)aContext->Viewport()[3],
+                                                    (float)aContext->Viewport()[0], 
+                                                    (float)aContext->Viewport()[1]));

Does it make sense reordering of well-known array?

+      if (aValue == "on"
+       || aValue == "1")
+      {
+        aChangeSet->ToSetAdvancedShading = 1;
+      }
+      else if (aValue == "off"
+            || aValue == "0")

ViewerTest::ParseOnOff()

+      + ((theBits & OpenGl_PO_MSAA) != 0 ? EOL"  occSetFragColor (vec4 (aEdgeColor, 1 - aMixVal));"


Invalid GLSL code.
Please make sure that GLSL programs are compilable without warnings on OpenGL drivers of different vendors.

+                                           EOL"  if (aMixColor.a == 0.0) discard;"
+                                           EOL"  else occSetFragColor (aMixColor);");

Why discard is needed here? Does it affect result or improves performance?

+void OpenGl_ShaderManager::prepareShadersOutSrc()

Please move this in/out variables processing into dedicated patch, so that we can push it to master soon in front of other part of the patch.

Hollow, Hidden Line, Shrinks and Solid Wireframe interior styles are drawing by shader program with geometry 
shader.

Please describe in more detail changes in behavior including benefits (performance, line size within Core Profile, OpenGL ES support) and cons (possible disappearance of entire mesh on zoom-out, etc.).
Put also information into upgrade guide.

> AP1_s1_clean_test_perf.jpg
Please put performance comparison to this bug in text form and I don't see performance results for other vendors - only NVIDIA is listed, no Intel and any mobile OpenGL ES graphics.
(0079086)
git   
2018-09-10 14:44   
Branch CR29076_6 has been created by mnv.

SHA-1: 6b297c2420b8cb2c363183ef85a229fe5f3624e6


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Added new Interior styles:
    - Pixel Shrink: display shrunk triangulation of surface on pixels
    - Scale Shrink: display shrunk triangulation of surface on scalability
    - Solid Wireframe: display boundaries and surface
    Hollow, Hidden Line, Shrinks and Solid Wireframe interior styles are drawing by shader program with geometry shader.
    Added new parameter for vsetedgetype command:
    [-width] - set width of wireframe line.
    [-scalefactor] - set scale factor value for Scale Shrink presentation.
    Updated vsetinteriorstyle command.
    Updated behaviour of vsetedgetype command.
    Added quad presentation mode.
(0079088)
git   
2018-09-10 15:34   
Branch CR29076_6 has been updated forcibly by mnv.

SHA-1: 04ac8ac2cc6c270c37fd294de338a1df3391d023
(0079110)
git   
2018-09-11 09:40   
Branch CR29076_6 has been updated forcibly by mnv.

SHA-1: 4925f5f415ce34c73289249c52e75f22d26cd592
(0079430)
git   
2018-09-27 09:23   
Branch CR29076_12 has been created by mnv.

SHA-1: 00303e92e6d783b25df2198f6bc865e004db3f3c


Detailed log of new commits:

Author: mnv
Date: Thu Sep 27 08:38:15 2018 +0300

    Implemented procedural generation of shader in/out section.

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Added new Interior styles:
    - Pixel Shrink: display shrunk triangulation of surface on pixels
    - Scale Shrink: display shrunk triangulation of surface on scalability
    - Solid Wireframe: display boundaries and surface
    Hollow, Hidden Line, Shrinks and Solid Wireframe interior styles are drawing by shader program with geometry shader.
    Added new parameter for vsetedgetype command:
    [-width] - set width of wireframe line.
    [-scalefactor] - set scale factor value for Scale Shrink presentation.
    Using the geometry shader has the following advantages:
    Hollow, Hidden Line and Solid Wireframe - configurable line size without using glPolygonMode.
    New interior styles support by OpenGl ES 3.2+.
    Better frame rate for big models (10M+ triangles).
    Updated vsetinteriorstyle command.
    Updated behaviour of vsetedgetype command.
    Added quad presentation mode.
    Updated upgrade documentation.

Author: mnv
Date: Mon Sep 24 11:53:12 2018 +0300

    0030153: Visualization, TKOpenGl - AIS_ColoredShape::SynchronizeAspects() doesn't update all aspects
    
    Added new virtual method OpenGl_Element::UpdateParameters().
    This method is needed for updating aspects for all OpenGl group members.
    Added new virtual method Graphic3d_Group::SynchronizeAspects().
    This method is overriden in OpenGl_Group and implement logic for updating presentation aspects after their modification.

Author: mnv
Date: Thu Sep 13 17:47:51 2018 +0300

    0030136: Visualization, TKOpenGl - Graphic3d_TOSM_FACET does not work on mobile devices
    
    Added new type of graphic3d limit Graphic3d_TypeOfLimit_HasFlatShading.
    Added workaround for unexpected behaviour of mobile devices with Adreno GPU.
    Added new complex flag hasFlatShading to OpenGl_Context for indicating support of flat shading.
(0079828)
git   
2018-10-09 17:54   
Branch CR29076_15 has been created by mnv.

SHA-1: 27dec47884cad617d6c14df69bd9a848c1f264da


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Added new Interior styles:
    - Solid Wireframe: display boundaries and surface
    Hollow, Hidden Line and Solid Wireframe interior styles are drawing by shader program with geometry shader.
    Added new parameter for vsetedgetype command:
    [-width] - set width of wireframe line.
    Using the geometry shader has the following advantages:
    Hollow, Hidden Line and Solid Wireframe - configurable line size without using glPolygonMode.
    New interior styles support by OpenGl ES 3.2+.
    Better frame rate for big models (10M+ triangles).
    Updated vsetinteriorstyle command.
    Updated behaviour of vsetedgetype command.
    Added quad presentation mode.
    Updated upgrade documentation.

Author: mnv
Date: Fri Sep 7 10:18:46 2018 +0300

    0030119: Visualization - implement mechanism for generating in/out section of shader programs.
    
    Added functionality which generate in/out part of shaders source code from prepared list of variables.

Author: mnv
Date: Thu Sep 27 16:30:48 2018 +0300

    0030166: Visualization, TKOpenGl - Implement the functionality for outputting the source code of the shader program.
    
    Added new option -glslcode for vgldebug command.
    This option have folowing parameters:
    off - disable glsl source code outputs
    short - outputs glsl source code in short format (except common declarations (global constants and Vertex Shader inputs))
    full - outputs glsl source code in full format.
(0079833)
git   
2018-10-10 08:32   
Branch CR29076_15 has been updated forcibly by mnv.

SHA-1: e33a14d32d09a201930bf3faae4605ac3c8dea94
(0079834)
git   
2018-10-10 08:45   
Branch CR29076_15 has been updated forcibly by mnv.

SHA-1: 95e381c9c1ae1dbc4c821e6b36abf4355e751dce
(0079836)
git   
2018-10-10 10:03   
Branch CR29076_15 has been updated forcibly by mnv.

SHA-1: 486704677d845b5975f8375f2c7716b4068342e3
(0079848)
git   
2018-10-10 12:18   
Branch CR29076_15 has been updated forcibly by mnv.

SHA-1: 7d28ebf0db5f62aba128ec71289f9c9171487d59
(0079873)
git   
2018-10-11 10:24   
Branch CR29076_15 has been updated forcibly by mnv.

SHA-1: 7dee8729342dc3b86449aad6a70cecfef716b499
(0079876)
git   
2018-10-11 11:20   
Branch CR29076_15 has been updated forcibly by mnv.

SHA-1: c0b71a4ad092e8249d9850d03de70938d60676a1
(0079890)
git   
2018-10-11 14:25   
Branch CR29076_16 has been created by mnv.

SHA-1: e1783394c439713c1083c01c1c2325f9cfd16a3d


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Added new Interior styles:
    - Solid Wireframe: display boundaries and surface
    Hollow, Hidden Line and Solid Wireframe interior styles are drawing by shader program with geometry shader.
    Added new parameter for vsetedgetype command:
    [-width] - set width of wireframe line.
    Using the geometry shader has the following advantages:
    Hollow, Hidden Line and Solid Wireframe - configurable line size without using glPolygonMode.
    New interior styles support by OpenGl ES 3.2+.
    Better frame rate for big models (10M+ triangles).
    Updated vsetinteriorstyle command.
    Updated behaviour of vsetedgetype command.
    Added quad presentation mode.
    Updated upgrade documentation.

Author: mnv
Date: Thu Sep 27 16:30:48 2018 +0300

    0030166: Visualization, TKOpenGl - add option OpenGl_Caps::glslDumpLevel dumping the source code of the shader program
    
    Added new option -glslcode for vgldebug command with the following values:
    - off disables glsl source code dump;
    - short to dump glsl source code in short format (except common declarations);
    - full to dump glsl source code in full format.
(0079910)
mnv   
2018-10-12 11:16   
Patch is ready for review.
(0079966)
git   
2018-10-15 15:57   
Branch CR29076_16 has been updated forcibly by mnv.

SHA-1: b071cafcbab0a959e7ac3203bdb6c9649fd4e670
(0080017)
git   
2018-10-16 15:14   
Branch CR29076_16 has been updated forcibly by mnv.

SHA-1: 5880e85d306ca473aec446460f2d2501f80287d5
(0080064)
git   
2018-10-17 16:37   
Branch CR29076_16 has been updated forcibly by mnv.

SHA-1: 055548752f350c71d74df9f567bcd679b206aa0e
(0080069)
git   
2018-10-17 17:36   
Branch CR29076_16 has been updated forcibly by mnv.

SHA-1: e1e9a867445484ba8f34078e5c2765d50aa4621d
(0080211)
kgv   
2018-10-22 23:46   
Please rebase the patch.
(0080231)
git   
2018-10-23 15:01   
Branch CR29076_17 has been created by mnv.

SHA-1: b86da1888ba5fe599ead3df0361fee189192c453


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Element shrinking shader was implemented.
    Added new Interior styles:
    - Solid Wireframe: display boundaries and surface
    Hollow, Hidden Line and Solid Wireframe interior styles are drawing by shader program with geometry shader.
    Added new parameter for vsetedgetype command:
    [-width] - set width of wireframe line.
    Using the geometry shader has the following advantages:
    Hollow, Hidden Line and Solid Wireframe - configurable line size without using glPolygonMode.
    New interior styles support by OpenGl ES 3.2+.
    Better frame rate for big models (10M+ triangles).
    Updated vsetinteriorstyle command.
    Updated behaviour of vsetedgetype command.
    Added quad presentation mode.
    Updated upgrade documentation.
(0080245)
git   
2018-10-24 08:23   
Branch CR29076_17 has been updated forcibly by mnv.

SHA-1: a51692888e51ef2ed3e44187bb3c65143953c9d6
(0080252)
mnv   
2018-10-24 10:53   
Patch rebased and ready for review.
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29076-master-MNV/view/ALL/ [^]
(0081506)
git   
2018-12-13 12:29   
Branch CR29076_17 has been updated forcibly by mnv.

SHA-1: 86c8ae991cf25cd7539cca5d49ba8deffe578caf
(0081515)
mnv   
2018-12-13 15:33   
Patch is ready for review
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29076-master-MNV/view/ALL/ [^]
(0081545)
git   
2018-12-18 10:50   
Branch CR29076_17 has been updated forcibly by mnv.

SHA-1: fe3edaefb53741db03f6bf9ece2c520d08af0b88
(0081546)
git   
2018-12-18 10:51   
Branch CR29076_17 has been updated forcibly by mnv.

SHA-1: 2d9911c267d5ff5e65dbb6ca5725137448be01fd
(0081551)
mnv   
2018-12-18 13:56   
Patch rebased and ready for review
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29076-master-MNV/view/ALL/ [^]
(0082184)
git   
2019-02-14 19:13   
Branch CR29076_18 has been created by kgv.

SHA-1: ba78c3ded68d39e2164d7f22367a40560bc17429


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Aspect_InteriorStyle has been extended by Aspect_IS_SOLID_WIREFRAME,
    which is now used by Graphic3d_AspectFillArea3d::SetDrawEdges() instead of dedicated Boolean flag.
    
    OpenGl_ShaderManager now provides built-in GLSL programs for drawing
    Aspect_IS_SOLID_WIREFRAME, Aspect_IS_HOLLOW and Aspect_IS_HIDDENLINE
    styles in single pass (and on OpenGL ES which does not provide glPolygonMode()).
    
    OpenGl_PrimitiveArray now uses GLSL programs instead of glPolygonMode() by default,
    which can be managed by OpenGl_Caps::usePolygonMode flag (desktop OpenGL only).
    glPolygonMode() is also used as fallback regardless OpenGl_Caps::usePolygonMode flag
    when GLSL programs are not supported (Geometry Shaders are required)
    or stipple line style is required (not implemented within Face GLSL).
    
    vsetedgetype and vsetinteriorstyle commands have been refactored to relax input syntax,
    handle Interior Style enumeration by names instead of integers,
    handle normalized color components, and avoid unnecessary actions.
    
    Redundant command BUC60738 has been removed.
(0082185)
git   
2019-02-14 20:05   
Branch CR29076_18 has been updated forcibly by kgv.

SHA-1: c3e5c7acc2db8794012f023c6015a44d314a1029
(0082186)
git   
2019-02-14 20:17   
Branch CR29076_18 has been updated forcibly by kgv.

SHA-1: 5b4e33c109335f79560efc8072e989494c690e1a
(0082187)
git   
2019-02-14 20:27   
Branch CR29076_18 has been updated forcibly by kgv.

SHA-1: c6f6dce30646921e10ba0ae001dedce12abbc691
(0082188)
git   
2019-02-14 20:50   
Branch CR29076_18 has been updated forcibly by kgv.

SHA-1: 2e34c19edf1c5b1535d4d6e82cc5419a62b7b3f2
(0082189)
git   
2019-02-14 23:41   
Branch CR29076_18 has been updated forcibly by kgv.

SHA-1: d0df7c31f40e4686ee12421cc7a23a6b94582ce0
(0082216)
git   
2019-02-19 00:04   
Branch CR29076_19 has been created by kgv.

SHA-1: 099f86e247bdc04f8c2903d84d5d2266d757a0b8


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Aspect_InteriorStyle has been extended by Aspect_IS_SOLID_WIREFRAME,
    which is now used by Graphic3d_AspectFillArea3d::SetDrawEdges() instead of dedicated Boolean flag.
    
    OpenGl_ShaderManager now provides built-in GLSL programs for drawing
    Aspect_IS_SOLID_WIREFRAME, Aspect_IS_HOLLOW and Aspect_IS_HIDDENLINE
    styles in single pass (and on OpenGL ES which does not provide glPolygonMode()).
    
    OpenGl_PrimitiveArray now uses GLSL programs instead of glPolygonMode() by default,
    which can be managed by OpenGl_Caps::usePolygonMode flag (desktop OpenGL only).
    glPolygonMode() is also used as fallback regardless OpenGl_Caps::usePolygonMode flag
    when GLSL programs are not supported (Geometry Shaders are required)
    or stipple line style is required (not implemented within Face GLSL).
    
    vsetedgetype and vsetinteriorstyle commands have been refactored to relax input syntax,
    handle Interior Style enumeration by names instead of integers,
    handle normalized color components, and avoid unnecessary actions.
    
    Redundant command BUC60738 has been removed.
(0082217)
git   
2019-02-19 01:52   
Branch CR29076_19 has been updated forcibly by kgv.

SHA-1: 67810589039f382e8d898c93340f18dcba81bb92
(0082218)
git   
2019-02-19 02:03   
Branch CR29076_19 has been updated forcibly by kgv.

SHA-1: c97eed8cda721714c8e9402ad1dd4b043ec87475
(0082225)
git   
2019-02-19 17:50   
Branch CR29076_20 has been created by kgv.

SHA-1: ffcc4759d6a0d1f557755e39eb1c8c2e93421cf1


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Aspect_InteriorStyle has been extended by Aspect_IS_SOLID_WIREFRAME,
    which is now used by Graphic3d_AspectFillArea3d::SetDrawEdges() instead of dedicated Boolean flag.
    
    OpenGl_ShaderManager now provides built-in GLSL programs for drawing
    Aspect_IS_SOLID_WIREFRAME, Aspect_IS_HOLLOW and Aspect_IS_HIDDENLINE
    styles in single pass (and on OpenGL ES which does not provide glPolygonMode()).
    
    Graphic3d_RenderingParams::ToEnableAlphaToCoverage is now enabled by default
    and properly handled at TKOpenGl level - enables coverage for Graphic3d_AlphaMode_Mask primitives.
    
    OpenGl_PrimitiveArray now uses GLSL programs instead of glPolygonMode() by default,
    which can be managed by OpenGl_Caps::usePolygonMode flag (desktop OpenGL only).
    glPolygonMode() is also used as fallback regardless OpenGl_Caps::usePolygonMode flag
    when GLSL programs are not supported (Geometry Shaders are required)
    or stipple line style is required (not implemented within Face GLSL).
    
    vaspects command has been extended by -setInterior -setEdgeColor -setEdgeType -setEdgeWidth
    arguments replacing vsetinteriorstyle/vsetedgetype/vunsetedgetype commands.
    ViewerTest::ParseColor() now parses RGBA color.
    
    Redundant command BUC60738 has been removed.
(0082226)
git   
2019-02-19 19:45   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: 829d02ee7644838af71fd1965b7c57aad0d2177e
(0082227)
git   
2019-02-19 19:48   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: 07437c1fecf81f69e9957a8f22bb83b484b5a530
(0082228)
git   
2019-02-19 20:36   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: 3692b72a468e490d761a67b56fe1f6b1a4c9d9aa
(0082229)
git   
2019-02-19 21:37   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: 38f7f13a58c4215f6bcd31d6afd56f6b49ad0373
(0082230)
git   
2019-02-19 21:51   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: b817859b3f2639097f1845e4dac151b916dab074
(0082231)
git   
2019-02-19 22:22   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: b471037e73fdf86c9eba519b4343b4ba7001a207
(0082232)
git   
2019-02-19 22:58   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: 6457543337b8f29fee9cd4484a5359590a54ba76
(0082234)
git   
2019-02-20 09:59   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: 1828cc115feacd4b68d501961b2b9a11c762ac1e
(0082238)
git   
2019-02-20 12:11   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: df41f1f5a5d1c2128ffb0b05a89337c29187b79b
(0082240)
git   
2019-02-20 18:38   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: e6d82aad0bd4823cbbefacd65c296a8e70c15be4
(0082242)
kgv   
2019-02-20 20:07   
Please raise the patch.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR29076_20-CR29076_20-KGV/ [^]
(0082243)
git   
2019-02-20 21:51   
Branch CR29076_20 has been updated forcibly by kgv.

SHA-1: 1fd65732ec097091e39da6be0c42fa7b20640d2a
(0082278)
apn   
2019-02-21 17:03   
Combination -
OCCT branch : CR29076_20
master SHA - 1fd65732ec097091e39da6be0c42fa7b20640d2a
d67d4b811012eef8913d3c535c29654d0acf3c4c
Products branch : CR29076_20 SHA - d02742684bde53dfe75415683a98c98f95273a35
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16542.63999999998 / 16568.890000000087 [-0.16%]
Products
Total CPU difference: 9102.370000000032 / 9068.370000000014 [+0.37%]
Windows-64-VC14:
OCCT
Total CPU difference: 18026.921875 / 17934.78125 [+0.51%]
Products
Total CPU difference: 10466.09375 / 10477.75 [-0.11%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0082293)
git   
2019-02-22 11:07   
Branch CR29076_21 has been created by kgv.

SHA-1: 7f0b60ea64a13041d10f7e1d8559a77d80448243


Detailed log of new commits:

Author: mnv
Date: Wed Aug 1 18:09:37 2018 +0300

    0029076: Visualization - implement element shrinking Shader
    
    Aspect_IS_HOLLOW now an alias to Aspect_IS_EMPTY and Aspect_IS_HIDDENLINE does not implicitly enables mesh edges,
    so that Graphic3d_AspectFillArea3d::SetDrawEdges() should be set independently.
    
    OpenGl_ShaderManager now provides built-in GLSL programs for drawing mesh edges
    in single pass (and on OpenGL ES which does not provide glPolygonMode()).
    
    Graphic3d_RenderingParams::ToEnableAlphaToCoverage is now enabled by default
    and properly handled at TKOpenGl level - enables coverage for Graphic3d_AlphaMode_Mask primitives.
    
    OpenGl_PrimitiveArray now uses GLSL programs instead of glPolygonMode() by default,
    which can be managed by OpenGl_Caps::usePolygonMode flag (desktop OpenGL only).
    glPolygonMode() is also used as fallback regardless OpenGl_Caps::usePolygonMode flag
    when GLSL programs are not supported (Geometry Shaders are required)
    or stipple line style is required (not implemented within Face GLSL).
    
    vaspects command has been extended by -setInterior -setDrawEdges -setEdgeColor -setEdgeType -setEdgeWidth
    arguments replacing vsetinteriorstyle/vsetedgetype/vunsetedgetype commands.
    vaspects now accepts arguments without "set" prefix.
    ViewerTest::ParseColor() now parses RGBA color.
    
    Redundant command BUC60738 has been removed.
    AIS_ColorScale - fixed usage of uninitialized FillArea aspects.
(0082296)
kgv   
2019-02-22 12:18   
Please take updated patch CR29076_21 into IR.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR29076_21-CR29076_20-KGV/ [^]
(0082610)
git   
2019-03-05 13:46   
Branch CR29076_17 has been deleted by kgv.

SHA-1: 2d9911c267d5ff5e65dbb6ca5725137448be01fd
(0082611)
git   
2019-03-05 13:46   
Branch CR29076_18 has been deleted by kgv.

SHA-1: d0df7c31f40e4686ee12421cc7a23a6b94582ce0
(0082614)
git   
2019-03-05 13:46   
Branch CR29076_21 has been deleted by kgv.

SHA-1: 7f0b60ea64a13041d10f7e1d8559a77d80448243
(0082613)
git   
2019-03-05 13:46   
Branch CR29076_20 has been deleted by kgv.

SHA-1: 1fd65732ec097091e39da6be0c42fa7b20640d2a
(0082612)
git   
2019-03-05 13:46   
Branch CR29076_19 has been deleted by kgv.

SHA-1: c97eed8cda721714c8e9402ad1dd4b043ec87475
(0082657)
git   
2019-03-05 13:48   
Branch CR29076 has been deleted by kgv.

SHA-1: bfd000869ad735514c6401fdb34fdf064ba7112c
(0082658)
git   
2019-03-05 13:48   
Branch CR29076_1 has been deleted by kgv.

SHA-1: adc133b300d5dab7fc188bc99b38492d4ce6d698
(0082663)
git   
2019-03-05 13:48   
Branch CR29076_3 has been deleted by kgv.

SHA-1: 6679e92105bc3c706c062bc29c48f43750141c9f
(0082662)
git   
2019-03-05 13:48   
Branch CR29076_2 has been deleted by kgv.

SHA-1: 7ec9ff6da893d77d5d87e09c5e9c3fb2a3ea394b
(0082661)
git   
2019-03-05 13:48   
Branch CR29076_16 has been deleted by kgv.

SHA-1: e1e9a867445484ba8f34078e5c2765d50aa4621d
(0082660)
git   
2019-03-05 13:48   
Branch CR29076_15 has been deleted by kgv.

SHA-1: c0b71a4ad092e8249d9850d03de70938d60676a1
(0082659)
git   
2019-03-05 13:48   
Branch CR29076_12 has been deleted by kgv.

SHA-1: 00303e92e6d783b25df2198f6bc865e004db3f3c
(0082664)
git   
2019-03-05 13:48   
Branch CR29076_4 has been deleted by kgv.

SHA-1: b9870f07075d49f483fe74a7f84affb9244c0540
(0082665)
git   
2019-03-05 13:48   
Branch CR29076_5 has been deleted by kgv.

SHA-1: 37de0c07122b484a7aa3613b235eafc0b72933e9
(0082666)
git   
2019-03-05 13:48   
Branch CR29076_6 has been deleted by kgv.

SHA-1: 4925f5f415ce34c73289249c52e75f22d26cd592