From bcac02809f46e9bd4ba190f87481f5896dbb45a3 Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 18 Apr 2018 21:55:12 +0200 Subject: [PATCH] Examples: Allegro 5: Renamed bindings from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp. --- CHANGELOG.txt | 3 ++- examples/allegro5_example/README.md | 7 +++---- .../{imgui_impl_a5.cpp => imgui_impl_allegro5.cpp} | 3 ++- .../{imgui_impl_a5.h => imgui_impl_allegro5.h} | 0 examples/allegro5_example/main.cpp | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) rename examples/allegro5_example/{imgui_impl_a5.cpp => imgui_impl_allegro5.cpp} (99%) rename examples/allegro5_example/{imgui_impl_a5.h => imgui_impl_allegro5.h} (100%) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 54f16b42a..3c98df91d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -52,7 +52,8 @@ Other Changes: - Window: Fixed popups/tooltips/menus not honoring style.DisplaySafeAreaPadding as well as it should have (part of menus displayed outside the safe area, etc.). - MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks] - Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439) -- Examples: Allegro5: Added support for 32-bit indices setup via defining ImDrawIdx, to avoid an unecessary conversion (Allegro 5 doesn't support 16-bit indices). +- Examples: Allegro 5: Added support for 32-bit indices setup via defining ImDrawIdx, to avoid an unecessary conversion (Allegro 5 doesn't support 16-bit indices). +- Examples: Allegro 5: Renamed bindings from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp. ----------------------------------------------------------------------- diff --git a/examples/allegro5_example/README.md b/examples/allegro5_example/README.md index 5f42b280c..4f18f2aba 100644 --- a/examples/allegro5_example/README.md +++ b/examples/allegro5_example/README.md @@ -2,7 +2,7 @@ # Configuration Dear ImGui outputs 16-bit vertex indices by default. -Allegro doesn't support them natively, so we have two solutions: convert the indices manually in imgui_impl_a5.cpp, or compile imgui with 32-bit indices. +Allegro doesn't support them natively, so we have two solutions: convert the indices manually in imgui_impl_allegro5.cpp, or compile imgui with 32-bit indices. You can either modify imconfig.h that comes with Dear ImGui (easier), or set a C++ preprocessor option IMGUI_USER_CONFIG to find to a filename. We are providing `imconfig_allegro5.h` that enables 32-bit indices. Note that the back-end supports _BOTH_ 16-bit and 32-bit indices, but 32-bit indices will be slightly faster as they won't require a manual conversion. @@ -12,13 +12,12 @@ Note that the back-end supports _BOTH_ 16-bit and 32-bit indices, but 32-bit ind - On Ubuntu 14.04+ ```bash -g++ -DIMGUI_USER_CONFIG=\"examples/allegro5_example/imconfig_allegro5.h\" -I ../.. main.cpp imgui_impl_a5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example +g++ -DIMGUI_USER_CONFIG=\"examples/allegro5_example/imconfig_allegro5.h\" -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example ``` - On Windows with Visual Studio's CLI ``` set ALLEGRODIR=path_to_your_allegro5_folder -set IMCONFIG_FILE=\"examples/allegro5_example/imconfig_allegro5.h\" -cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=%IMCONFIG_FILE% /I ..\.. main.cpp imgui_impl_a5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib +cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/allegro5_example/imconfig_allegro5.h\" /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib ``` diff --git a/examples/allegro5_example/imgui_impl_a5.cpp b/examples/allegro5_example/imgui_impl_allegro5.cpp similarity index 99% rename from examples/allegro5_example/imgui_impl_a5.cpp rename to examples/allegro5_example/imgui_impl_allegro5.cpp index 59ca1ecf1..1c9165254 100644 --- a/examples/allegro5_example/imgui_impl_a5.cpp +++ b/examples/allegro5_example/imgui_impl_allegro5.cpp @@ -12,6 +12,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2018-04-18: Misc: Renamed file from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp. // 2018-04-18: Misc: Added support for 32-bits vertex indices to avoid conversion at runtime. Added imconfig_allegro5.h to enforce 32-bit indices when included from imgui.h. // 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplA5_RenderDrawData() in the .h file so you can call it yourself. // 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves. @@ -20,7 +21,7 @@ #include // uint64_t #include // memcpy #include "imgui.h" -#include "imgui_impl_a5.h" +#include "imgui_impl_allegro5.h" #include #include diff --git a/examples/allegro5_example/imgui_impl_a5.h b/examples/allegro5_example/imgui_impl_allegro5.h similarity index 100% rename from examples/allegro5_example/imgui_impl_a5.h rename to examples/allegro5_example/imgui_impl_allegro5.h diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp index 6169ebca2..5ecd41253 100644 --- a/examples/allegro5_example/main.cpp +++ b/examples/allegro5_example/main.cpp @@ -5,7 +5,7 @@ #include #include #include "imgui.h" -#include "imgui_impl_a5.h" +#include "imgui_impl_allegro5.h" int main(int, char**) {