mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-16 01:33:14 +02:00
Examples: DirectX10: Reusing imgui_impl_win32, removed that code from imgui_impl_dx10
This commit is contained in:
@ -2,7 +2,8 @@
|
||||
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
|
||||
|
||||
#include "imgui.h"
|
||||
#include "imgui_impl_dx10.h"
|
||||
#include "../imgui_impl_win32.h"
|
||||
#include "../imgui_impl_dx10.h"
|
||||
#include <d3d10_1.h>
|
||||
#include <d3d10.h>
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
@ -122,7 +123,8 @@ int main(int, char**)
|
||||
// Setup ImGui binding
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
ImGui_ImplDX10_Init(hwnd, g_pd3dDevice);
|
||||
ImGui_ImplWin32_Init(hwnd);
|
||||
ImGui_ImplDX10_Init(g_pd3dDevice);
|
||||
//io.NavFlags |= ImGuiNavFlags_EnableKeyboard; // Enable Keyboard Controls
|
||||
|
||||
// Setup style
|
||||
@ -164,6 +166,7 @@ int main(int, char**)
|
||||
continue;
|
||||
}
|
||||
ImGui_ImplDX10_NewFrame();
|
||||
ImGui_ImplWin32_NewFrame();
|
||||
|
||||
// 1. Show a simple window.
|
||||
// Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
|
||||
@ -213,6 +216,7 @@ int main(int, char**)
|
||||
}
|
||||
|
||||
ImGui_ImplDX10_Shutdown();
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
|
||||
CleanupDeviceD3D();
|
||||
|
Reference in New Issue
Block a user