Browse Source

supports_stencil

David Rose 17 years ago
parent
commit
ea2f07943a
1 changed files with 7 additions and 0 deletions
  1. 7 0
      panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx

+ 7 - 0
panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx

@@ -1827,6 +1827,13 @@ reset() {
       << "\n";
   }
 
+  if (support_stencil) {
+    int min_stencil = D3DSTENCILCAPS_ZERO | D3DSTENCILCAPS_REPLACE | D3DSTENCILCAPS_INCR | D3DSTENCILCAPS_DECR;
+    if ((d3d_caps.StencilCaps & min_stencil) == min_stencil) {
+      _supports_stencil = true;
+    }
+  }
+
   _max_vertices_per_array = d3d_caps.MaxVertexIndex;
   _max_vertices_per_primitive = d3d_caps.MaxPrimitiveCount;