Browse Source

Fix multi-texture shader non-texture drawing problem.

aignacio_sf 19 years ago
parent
commit
d0ec0c2c43

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

@@ -2962,6 +2962,7 @@ do_issue_shader() {
       _current_shader_context->unbind(this);
       _current_shader_expansion = 0;
       _current_shader_context = 0;
+      disable_standard_texture_bindings();
     }
     return;
   }
@@ -2973,6 +2974,7 @@ do_issue_shader() {
       _current_shader_context->unbind(this);
       _current_shader_context = 0;
       _current_shader_expansion = 0;
+      disable_standard_texture_bindings();
     }
     if (context != 0) {
       context->bind(this);
@@ -3622,6 +3624,7 @@ disable_standard_texture_bindings() {
         << ", NULL) failed "
         << D3DERRORSTRING(hr);
     }
+    set_texture_stage_state(i, D3DTSS_COLOROP, D3DTOP_DISABLE);
   }
 
   _num_active_texture_stages = 0;

+ 0 - 3
panda/src/dxgsg9/dxShaderContext9.cxx

@@ -544,9 +544,6 @@ bind(GSG *gsg) {
 
       // clear the last cached FVF to make sure the next SetFVF call goes through
       gsg -> _last_fvf = 0;
-      // turn off fixed-function multi-texture
-      gsg -> set_texture_stage_state (0, D3DTSS_COLOROP, D3DTOP_DISABLE);
-      gsg -> set_texture_stage_state (1, D3DTSS_COLOROP, D3DTOP_DISABLE);
 
       // Pass in k-parameters and transform-parameters
       issue_parameters(gsg, true);