mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 01:20:55 +01:00
Examples: Allegro 5: Renamed bindings from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp.
This commit is contained in:
parent
3913297384
commit
bcac02809f
@ -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.).
|
- 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]
|
- 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)
|
- 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.
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
Dear ImGui outputs 16-bit vertex indices by default.
|
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.
|
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.
|
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.
|
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+
|
- On Ubuntu 14.04+
|
||||||
|
|
||||||
```bash
|
```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
|
- On Windows with Visual Studio's CLI
|
||||||
|
|
||||||
```
|
```
|
||||||
set ALLEGRODIR=path_to_your_allegro5_folder
|
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=\"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
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
// CHANGELOG
|
// CHANGELOG
|
||||||
// (minor and older changes stripped away, please see git history for details)
|
// (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-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-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.
|
// 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 <stdint.h> // uint64_t
|
#include <stdint.h> // uint64_t
|
||||||
#include <cstring> // memcpy
|
#include <cstring> // memcpy
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "imgui_impl_a5.h"
|
#include "imgui_impl_allegro5.h"
|
||||||
#include <allegro5/allegro.h>
|
#include <allegro5/allegro.h>
|
||||||
#include <allegro5/allegro_primitives.h>
|
#include <allegro5/allegro_primitives.h>
|
||||||
|
|
@ -5,7 +5,7 @@
|
|||||||
#include <allegro5/allegro.h>
|
#include <allegro5/allegro.h>
|
||||||
#include <allegro5/allegro_primitives.h>
|
#include <allegro5/allegro_primitives.h>
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "imgui_impl_a5.h"
|
#include "imgui_impl_allegro5.h"
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user