From 5d53f37a5d760db532755571e8d92cdd261c5d4b Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 13 Oct 2015 17:53:43 +0200 Subject: [PATCH] Examples: Possibly clarified the intent of imgui_impl_* files. --- examples/allegro5_example/imgui_impl_a5.cpp | 3 +++ examples/allegro5_example/imgui_impl_a5.h | 3 +++ examples/directx11_example/imgui_impl_dx11.cpp | 3 +++ examples/directx11_example/imgui_impl_dx11.h | 3 +++ examples/directx9_example/imgui_impl_dx9.cpp | 3 +++ examples/directx9_example/imgui_impl_dx9.h | 3 +++ examples/ios_example/README.md | 6 ++---- examples/opengl3_example/imgui_impl_glfw_gl3.cpp | 3 +++ examples/opengl3_example/imgui_impl_glfw_gl3.h | 3 +++ examples/opengl_example/imgui_impl_glfw.cpp | 3 +++ examples/opengl_example/imgui_impl_glfw.h | 3 +++ examples/sdl_opengl_example/imgui_impl_sdl.cpp | 3 +++ examples/sdl_opengl_example/imgui_impl_sdl.h | 3 +++ 13 files changed, 38 insertions(+), 4 deletions(-) diff --git a/examples/allegro5_example/imgui_impl_a5.cpp b/examples/allegro5_example/imgui_impl_a5.cpp index b5dd74395..8faa332ce 100644 --- a/examples/allegro5_example/imgui_impl_a5.cpp +++ b/examples/allegro5_example/imgui_impl_a5.cpp @@ -1,4 +1,7 @@ // ImGui Allegro 5 bindings +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui // by @birthggd diff --git a/examples/allegro5_example/imgui_impl_a5.h b/examples/allegro5_example/imgui_impl_a5.h index a6cda1c06..ec10fff1a 100644 --- a/examples/allegro5_example/imgui_impl_a5.h +++ b/examples/allegro5_example/imgui_impl_a5.h @@ -1,4 +1,7 @@ // ImGui Allegro 5 bindings +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui // by @birthggd diff --git a/examples/directx11_example/imgui_impl_dx11.cpp b/examples/directx11_example/imgui_impl_dx11.cpp index cf862995a..6e7f1944d 100644 --- a/examples/directx11_example/imgui_impl_dx11.cpp +++ b/examples/directx11_example/imgui_impl_dx11.cpp @@ -1,4 +1,7 @@ // ImGui Win32 + DirectX11 binding +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui #include diff --git a/examples/directx11_example/imgui_impl_dx11.h b/examples/directx11_example/imgui_impl_dx11.h index a36bfd68c..e5d446009 100644 --- a/examples/directx11_example/imgui_impl_dx11.h +++ b/examples/directx11_example/imgui_impl_dx11.h @@ -1,4 +1,7 @@ // ImGui Win32 + DirectX11 binding +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui struct ID3D11Device; diff --git a/examples/directx9_example/imgui_impl_dx9.cpp b/examples/directx9_example/imgui_impl_dx9.cpp index b81863294..1e7c7900e 100644 --- a/examples/directx9_example/imgui_impl_dx9.cpp +++ b/examples/directx9_example/imgui_impl_dx9.cpp @@ -1,4 +1,7 @@ // ImGui Win32 + DirectX9 binding +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui #include diff --git a/examples/directx9_example/imgui_impl_dx9.h b/examples/directx9_example/imgui_impl_dx9.h index 99075e535..608626fbc 100644 --- a/examples/directx9_example/imgui_impl_dx9.h +++ b/examples/directx9_example/imgui_impl_dx9.h @@ -1,4 +1,7 @@ // ImGui Win32 + DirectX9 binding +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui struct IDirect3DDevice9; diff --git a/examples/ios_example/README.md b/examples/ios_example/README.md index 5b51b905b..a2ada955e 100644 --- a/examples/ios_example/README.md +++ b/examples/ios_example/README.md @@ -1,14 +1,14 @@ # iOS example ----- ## Introduction This example is the default XCode "OpenGL" example code, modified to support ImGui and [Synergy](http://synergy-project.org/). +It is a rather complex example because of all of the faff required to get an XCode/iOS application running. Refer to the regular OpenGL examples if you want to learn about integrating ImGui. + Synergy (remote keyboard/mouse) is not required, but it's pretty hard to use ImGui without it. Synergy includes a "uSynergy" library that allows embedding a synergy client, this is what is used here. ImGui supports "TouchPadding", and this is enabled when Synergy is not active. ## How to Use ----- 0. In Synergy, go to Preferences, and uncheck "Use SSL encryption" 0. Run the example app. @@ -16,7 +16,6 @@ Synergy (remote keyboard/mouse) is not required, but it's pretty hard to use ImG 0. Enter the name or the IP of your synergy host 0. If you had previously connected to a server, you may need to kill and re-start the app. ----- ## Notes and TODOs Things that would be nice but I didn't get around to doing: @@ -26,7 +25,6 @@ Things that would be nice but I didn't get around to doing: * Graceful disconnect/reconnect from uSynergy. * Copy/Paste not well-supported ----- ## C++ on iOS ImGui is a c++ library. If you want to include it directly, rename your Obj-C file to have the ".mm" extension. diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index d111b76ac..0b5b658b4 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -1,4 +1,7 @@ // ImGui GLFW binding with OpenGL3 + shaders +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui #include diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.h b/examples/opengl3_example/imgui_impl_glfw_gl3.h index edec71c3b..33e01c30b 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.h +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.h @@ -1,4 +1,7 @@ // ImGui GLFW binding with OpenGL3 + shaders +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui struct GLFWwindow; diff --git a/examples/opengl_example/imgui_impl_glfw.cpp b/examples/opengl_example/imgui_impl_glfw.cpp index 27625e7e1..3e06e4b90 100644 --- a/examples/opengl_example/imgui_impl_glfw.cpp +++ b/examples/opengl_example/imgui_impl_glfw.cpp @@ -1,4 +1,7 @@ // ImGui GLFW binding with OpenGL +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui #include diff --git a/examples/opengl_example/imgui_impl_glfw.h b/examples/opengl_example/imgui_impl_glfw.h index 35088f0ed..05fe6b054 100644 --- a/examples/opengl_example/imgui_impl_glfw.h +++ b/examples/opengl_example/imgui_impl_glfw.h @@ -1,4 +1,7 @@ // ImGui GLFW binding with OpenGL +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui struct GLFWwindow; diff --git a/examples/sdl_opengl_example/imgui_impl_sdl.cpp b/examples/sdl_opengl_example/imgui_impl_sdl.cpp index 5d7c44a34..aed5881bd 100644 --- a/examples/sdl_opengl_example/imgui_impl_sdl.cpp +++ b/examples/sdl_opengl_example/imgui_impl_sdl.cpp @@ -1,4 +1,7 @@ // ImGui SDL2 binding with OpenGL +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui #include diff --git a/examples/sdl_opengl_example/imgui_impl_sdl.h b/examples/sdl_opengl_example/imgui_impl_sdl.h index 1edd8980e..cef9817c2 100644 --- a/examples/sdl_opengl_example/imgui_impl_sdl.h +++ b/examples/sdl_opengl_example/imgui_impl_sdl.h @@ -1,4 +1,7 @@ // ImGui SDL2 binding with OpenGL +// You can copy and use unmodified imgui_impl_* files in your project. +// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). +// See main.cpp for an example of using this. // https://github.com/ocornut/imgui struct SDL_Window;