Examples: DX10: Multi viewport/platform support (based on DX11 version). (#1542)

This commit is contained in:
omar
2018-02-28 18:35:16 +01:00
parent 997d1bd0eb
commit fc3c3de70d
3 changed files with 149 additions and 3 deletions

View File

@ -115,9 +115,11 @@ int main(int, char**)
// Setup ImGui binding
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
io.ConfigFlags |= ImGuiConfigFlags_MultiViewports;
//io.NavFlags |= ImGuiNavFlags_EnableKeyboard; // Enable Keyboard Controls
ImGui_ImplWin32_Init(hwnd);
ImGui_ImplDX10_Init(g_pd3dDevice);
//io.NavFlags |= ImGuiNavFlags_EnableKeyboard; // Enable Keyboard Controls
// Setup style
ImGui::StyleColorsDark();
@ -203,6 +205,9 @@ int main(int, char**)
ImGui::Render();
ImGui_ImplDX10_RenderDrawData(ImGui::GetDrawData());
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindows();
g_pSwapChain->Present(1, 0); // Present with vsync
//g_pSwapChain->Present(0, 0); // Present without vsync
}