0022906: Gradient background is clipped by planes
authorSZV <>
Fri, 27 Jan 2012 13:52:58 +0000 (13:52 +0000)
committerbugmaster <bugmaster@opencascade.com>
Mon, 5 Mar 2012 15:32:07 +0000 (19:32 +0400)
src/OpenGl/OpenGl_view.cxx

index cfd1e39..55463af 100755 (executable)
@@ -1236,6 +1236,14 @@ TelClearBackground( Tint  Wsid /* Workstation id */ )
 #endif  
   tsm_bg_gradient gradient;
 
+  // Disable clipping planes
+  GLint ii = 0, max_plane = 0;
+  glGetIntegerv( GL_MAX_CLIP_PLANES, &max_plane );
+  while (ii < max_plane) {
+    const GLint planeid = GL_CLIP_PLANE0 + ii++;
+    if (glIsEnabled(planeid));
+      glDisable(planeid);
+  }
 
   TsmGetWSAttri (Wsid, WSBackground, &key);
   rgb = (Tfloat *)key.pdata;