From ea2f07943a4e39f7b45e40579f58417536d8fb91 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 26 Dec 2008 23:00:01 +0000 Subject: [PATCH] supports_stencil --- panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx index ac541f2205..e4b10dd315 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx +++ b/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;