1 // dear imgui: Renderer + Platform Binding for Allegro 5 2 // (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.) 3 4 // Implemented features: 5 // [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp. 6 // [X] Platform: Clipboard support (from Allegro 5.1.12) 7 // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 8 // Issues: 9 // [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually. 10 // [ ] Platform: Missing gamepad support. 11 12 // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 13 // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 14 // https://github.com/ocornut/imgui, Original Allegro 5 code by @birthggd 15 16 #pragma once 17 18 struct ALLEGRO_DISPLAY; 19 union ALLEGRO_EVENT; 20 21 IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display); 22 IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown(); 23 IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame(); 24 IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data); 25 IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event); 26 27 // Use if you want to reset your rendering device without losing ImGui state. 28 IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects(); 29 IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects(); 30