David Rose 18 年之前
父節點
當前提交
43101ae12e
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 4 0
      panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx
  2. 4 0
      panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx

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

@@ -1922,6 +1922,10 @@ reset() {
 
   void dx_set_stencil_functions (StencilRenderStates *stencil_render_states);
   dx_set_stencil_functions (_stencil_render_states);
+
+  // Now that the GSG has been initialized, make it available for
+  // optimizations.
+  add_gsg(this);
 }
 
 ////////////////////////////////////////////////////////////////////

+ 4 - 0
panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx

@@ -3027,6 +3027,10 @@ reset() {
 
   void dx_set_stencil_functions (StencilRenderStates *stencil_render_states);
   dx_set_stencil_functions (_stencil_render_states);
+
+  // Now that the GSG has been initialized, make it available for
+  // optimizations.
+  add_gsg(this);
 }
 
 ////////////////////////////////////////////////////////////////////