// prepare for rendering the clip planes
glEnable (GL_STENCIL_TEST);
+ // remember current state of depth
+ // function and change its value
+ GLint aDepthFuncPrev;
+ glGetIntegerv (GL_DEPTH_FUNC, &aDepthFuncPrev);
+ glDepthFunc (GL_LESS);
+
// generate capping for every clip plane
for (aCappingIt.Init (aContextPlanes); aCappingIt.More(); aCappingIt.Next())
{
// render capping plane using the generated stencil mask
glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDepthMask (GL_TRUE);
- glDepthFunc (GL_LESS);
glStencilFunc (GL_EQUAL, 1, 0x01);
glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP);
glEnable (GL_DEPTH_TEST);
// restore previous application state
glClear (GL_STENCIL_BUFFER_BIT);
+ glDepthFunc (aDepthFuncPrev);
glStencilFunc (GL_ALWAYS, 0, 0xFF);
glDisable (GL_STENCIL_TEST);
--- /dev/null
+puts "============"
+puts "CR25060"
+puts "============"
+puts ""
+#######################################################################
+# Capping breaks highlighting of shaded AIS_Shape with displayed edges.
+#######################################################################
+vinit View1
+box b 10 10 10
+vdisplay b
+vshowfaceboundary b 1
+vclipplane create pln1
+vclipplane set pln1 object b
+vclipplane change pln1 equation 0 1 0 -5
+vclipplane change pln1 capping on
+vsetdispmode 1
+vfit
+vmoveto 304 146
+
+set x_coord 304
+set y_coord 146
+checkcolor $x_coord $y_coord 0 1 1
+if { $stat != 1 } {
+ puts "Error : Highlighting is broken."
+}
+
+set only_screen 1