Browse Source

Fix stencil clear: reset stencil mask before glClearStencil

rdb 11 years ago
parent
commit
17aafeba15
1 changed files with 1 additions and 0 deletions
  1. 1 0
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 1 - 0
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -2412,6 +2412,7 @@ clear(DrawableRegion *clearable) {
   }
   }
 
 
   if (clearable->get_clear_stencil_active()) {
   if (clearable->get_clear_stencil_active()) {
+    glStencilMask(~0);
     glClearStencil(clearable->get_clear_stencil());
     glClearStencil(clearable->get_clear_stencil());
     mask |= GL_STENCIL_BUFFER_BIT;
     mask |= GL_STENCIL_BUFFER_BIT;
   }
   }