Browse Source

Examples: DirectX10 fixed ImGui_ImplDX10_NewFrame() from recreating device objects if render isn't called (g_pVB not set)

ocornut 9 years ago
parent
commit
31fe006c85
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/directx10_example/imgui_impl_dx10.cpp

+ 1 - 1
examples/directx10_example/imgui_impl_dx10.cpp

@@ -474,7 +474,7 @@ void ImGui_ImplDX10_Shutdown()
 
 void ImGui_ImplDX10_NewFrame()
 {
-    if (!g_pVB)
+    if (!g_pFontSampler)
         ImGui_ImplDX10_CreateDeviceObjects();
 
     ImGuiIO& io = ImGui::GetIO();