From a3f3793cb628797dbed48600f6bf80b8fd749326 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 9 Mar 2015 13:05:18 +0000 Subject: [PATCH] Examples: Tweaks. --- examples/directx9_example/imgui_impl_dx9.cpp | 2 +- examples/directx9_example/imgui_impl_dx9.h | 2 +- examples/directx9_example/main.cpp | 2 +- examples/opengl3_example/imgui_impl_glfw_gl3.h | 3 ++- examples/opengl_example/imgui_impl_glfw.h | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/directx9_example/imgui_impl_dx9.cpp b/examples/directx9_example/imgui_impl_dx9.cpp index 9e0a342f..370bcb12 100644 --- a/examples/directx9_example/imgui_impl_dx9.cpp +++ b/examples/directx9_example/imgui_impl_dx9.cpp @@ -176,7 +176,7 @@ void ImGui_ImplDX9_InitFontsTexture() g_FontTextureLoaded = true; } -bool ImGui_ImplDX9_Init(void* hwnd, IDirect3DDevice9* device, bool install_callbacks) +bool ImGui_ImplDX9_Init(void* hwnd, IDirect3DDevice9* device) { g_pd3dDevice = device; if (!QueryPerformanceFrequency((LARGE_INTEGER *)&g_TicksPerSecond)) diff --git a/examples/directx9_example/imgui_impl_dx9.h b/examples/directx9_example/imgui_impl_dx9.h index 327ec25d..6574e3f7 100644 --- a/examples/directx9_example/imgui_impl_dx9.h +++ b/examples/directx9_example/imgui_impl_dx9.h @@ -3,7 +3,7 @@ struct IDirect3DDevice9; -bool ImGui_ImplDX9_Init(void* hwnd, IDirect3DDevice9* device, bool install_callbacks); +bool ImGui_ImplDX9_Init(void* hwnd, IDirect3DDevice9* device); void ImGui_ImplDX9_InitFontsTexture(); void ImGui_ImplDX9_Shutdown(); void ImGui_ImplDX9_NewFrame(); diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp index 6bfd91e7..65069805 100644 --- a/examples/directx9_example/main.cpp +++ b/examples/directx9_example/main.cpp @@ -61,7 +61,7 @@ int main(int argc, char** argv) UpdateWindow(hwnd); // ImGui - ImGui_ImplDX9_Init(hwnd, pd3dDevice, true); + ImGui_ImplDX9_Init(hwnd, pd3dDevice); //ImGuiIO& io = ImGui::GetIO(); //ImFont* my_font1 = io.Fonts->AddFontDefault(); //ImFont* my_font2 = io.Fonts->AddFontFromFileTTF("extra_fonts/Karla-Regular.ttf", 15.0f); diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.h b/examples/opengl3_example/imgui_impl_glfw_gl3.h index d3d1d817..16d5d532 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.h +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.h @@ -9,7 +9,8 @@ void ImGui_ImplGlfwGL3_Shutdown(); void ImGui_ImplGlfwGL3_NewFrame(); // GLFW callbacks (installed by default if you enable 'install_callbacks' during initialization) -// Provide here if you want to chain callbacks +// Provided here if you want to chain callbacks. +// You can also handle inputs yourself and use those as a reference. void ImGui_ImplGlfwGL3_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods); void ImGui_ImplGlfwGL3_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset); void ImGui_ImplGlFwGL3_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods); diff --git a/examples/opengl_example/imgui_impl_glfw.h b/examples/opengl_example/imgui_impl_glfw.h index 455b542a..53909fa6 100644 --- a/examples/opengl_example/imgui_impl_glfw.h +++ b/examples/opengl_example/imgui_impl_glfw.h @@ -9,7 +9,8 @@ void ImGui_ImplGlfw_Shutdown(); void ImGui_ImplGlfw_NewFrame(); // GLFW callbacks (installed by default if you enable 'install_callbacks' during initialization) -// Provide here if you want to chain callbacks +// Provided here if you want to chain callbacks. +// You can also handle inputs yourself and use those as a reference. void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods); void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset); void ImGui_ImplGlFw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);