From e09e2cbd28833badd1264a4125eccc11ecba411b Mon Sep 17 00:00:00 2001 From: heroboy Date: Tue, 7 Apr 2015 19:36:58 +0800 Subject: [PATCH] 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. --- examples/directx9_example/imgui_impl_dx9.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/directx9_example/imgui_impl_dx9.cpp b/examples/directx9_example/imgui_impl_dx9.cpp index b726e50e..635e2c6c 100644 --- a/examples/directx9_example/imgui_impl_dx9.cpp +++ b/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_pd3dDevice->SetPixelShader(NULL); + g_pd3dDevice->SetVertexShader(NULL); g_pd3dDevice->SetStreamSource( 0, g_pVB, 0, sizeof( CUSTOMVERTEX ) ); g_pd3dDevice->SetFVF( D3DFVF_CUSTOMVERTEX );