浏览代码

set pixel shader and vertex shader to NULL

Previous graphic render may use shaders,so set pixel shader and vertex shader to NULL to force use fixed pipeline.
heroboy 10 年之前
父节点
当前提交
e09e2cbd28
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/directx9_example/imgui_impl_dx9.cpp

+ 2 - 1
examples/directx9_example/imgui_impl_dx9.cpp

@@ -57,7 +57,8 @@ static void ImGui_ImplDX9_RenderDrawLists(ImDrawList** const cmd_lists, int cmd_
         }
         }
     }
     }
     g_pVB->Unlock();
     g_pVB->Unlock();
-
+    g_pd3dDevice->SetPixelShader(NULL);
+    g_pd3dDevice->SetVertexShader(NULL);
     g_pd3dDevice->SetStreamSource( 0, g_pVB, 0, sizeof( CUSTOMVERTEX ) );
     g_pd3dDevice->SetStreamSource( 0, g_pVB, 0, sizeof( CUSTOMVERTEX ) );
     g_pd3dDevice->SetFVF( D3DFVF_CUSTOMVERTEX );
     g_pd3dDevice->SetFVF( D3DFVF_CUSTOMVERTEX );