Skip to content

Commit 50fa67b

Browse files
committed
Updated imgui to v1.92.5
1 parent a93e50f commit 50fa67b

143 files changed

Lines changed: 21442 additions & 9319 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

neo/framework/Dhewm3SettingsMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ static void DrawOtherOptionsMenu()
24642464

24652465
static bool BeginTabChild( const char* name )
24662466
{
2467-
bool ret = ImGui::BeginChild( name, ImVec2(0, 0), 0, ImGuiWindowFlags_NavFlattened );
2467+
bool ret = ImGui::BeginChild( name, ImVec2(0, 0), 0, ImGuiChildFlags_NavFlattened );
24682468
float itemWidth = fminf( ImGui::GetWindowWidth() * 0.5f, ImGui::GetFontSize() * 20.0f );
24692469
ImGui::PushItemWidth( itemWidth );
24702470
return ret;

neo/libs/imgui/.gitignore

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ imgui*.ini
1212
examples/*/Debug/*
1313
examples/*/Release/*
1414
examples/*/x64/*
15+
examples/*.tmp
1516

1617
## Visual Studio artifacts
1718
.vs
@@ -29,12 +30,14 @@ ipch
2930
## Getting files created in JSON/Schemas/Catalog/ from a VS2022 update
3031
JSON/
3132

32-
## Commonly used CMake directories
33+
## Commonly used CMake directories & CMake CPM cache
3334
build*/
35+
.cache
3436

35-
## Xcode artifacts
37+
## Xcode & macOS artifacts
3638
project.xcworkspace
3739
xcuserdata
40+
examples/*/*.dSYM
3841

3942
## Emscripten artifacts
4043
examples/*.o.tmp
@@ -44,18 +47,33 @@ examples/example_glfw_opengl3/web/*
4447
examples/example_glfw_wgpu/web/*
4548
examples/example_glfw_wgpu/external/*
4649
examples/example_sdl2_opengl3/web/*
50+
examples/example_sdl2_wgpu/web/*
51+
examples/example_sdl3_opengl3/web/*
52+
examples/example_sdl3_wgpu/web/*
4753

4854
## JetBrains IDE artifacts
4955
.idea
5056
cmake-build-*
5157

58+
## VS code artifacts
59+
.vscode
60+
5261
## Unix executables from our example Makefiles
62+
examples/example_apple_metal/example_apple_metal
63+
examples/example_apple_opengl2/example_apple_opengl2
5364
examples/example_glfw_metal/example_glfw_metal
5465
examples/example_glfw_opengl2/example_glfw_opengl2
5566
examples/example_glfw_opengl3/example_glfw_opengl3
67+
examples/example_glfw_vulkan/example_glfw_vulkan
5668
examples/example_glut_opengl2/example_glut_opengl2
5769
examples/example_null/example_null
5870
examples/example_sdl2_metal/example_sdl2_metal
5971
examples/example_sdl2_opengl2/example_sdl2_opengl2
6072
examples/example_sdl2_opengl3/example_sdl2_opengl3
61-
examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer
73+
examples/example_sdl2_sdlrenderer2/example_sdl2_sdlrenderer2
74+
examples/example_sdl2_vulkan/example_sdl2_vulkan
75+
examples/example_sdl3_metal/example_sdl3_metal
76+
examples/example_sdl3_opengl3/example_sdl3_opengl3
77+
examples/example_sdl3_sdlgpu3/example_sdl3_sdlgpu3
78+
examples/example_sdl3_sdlrenderer3/example_sdl3_sdlrenderer3
79+
examples/example_sdl3_vulkan/example_sdl3_vulkan

neo/libs/imgui/backends/imgui_impl_allegro5.cpp

Lines changed: 132 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
// (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.)
33

44
// Implemented features:
5-
// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID!
5+
// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
6+
// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
67
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values are obsolete since 1.87 and not supported since 1.91.5]
78
// [X] Platform: Clipboard support (from Allegro 5.1.12).
89
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
910
// Missing features or Issues:
10-
// [ ] Renderer: The renderer is suboptimal as we need to convert vertices manually.
11+
// [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually.
1112
// [ ] Platform: Missing gamepad support.
1213

1314
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
@@ -20,6 +21,12 @@
2021

2122
// CHANGELOG
2223
// (minor and older changes stripped away, please see git history for details)
24+
// 2025-09-18: Call platform_io.ClearRendererHandlers() and platform_io.ClearPlatformHandlers() on shutdown.
25+
// 2025-08-12: Inputs: fixed missing support for ImGuiKey_PrintScreen under Windows, as raw Allegro 5 does not receive it.
26+
// 2025-08-12: Added ImGui_ImplAllegro5_SetDisplay() function to change current ALLEGRO_DISPLAY, as Allegro applications often need to do that.
27+
// 2025-07-07: Fixed texture update broken on some platforms where ALLEGRO_LOCK_WRITEONLY needed all texels to be rewritten.
28+
// 2025-06-11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas. Removed ImGui_ImplSDLGPU3_CreateFontsTexture() and ImGui_ImplSDLGPU3_DestroyFontsTexture().
29+
// 2025-02-18: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support.
2330
// 2025-01-06: Avoid calling al_set_mouse_cursor() repeatedly since it appears to leak on on X11 (#8256).
2431
// 2024-08-22: moved some OS/backend related function pointers from ImGuiIO to ImGuiPlatformIO:
2532
// - io.GetClipboardTextFn -> platform_io.Platform_GetClipboardTextFn
@@ -136,6 +143,13 @@ void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data)
136143
if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f)
137144
return;
138145

146+
// Catch up with texture updates. Most of the times, the list will have 1 element with an OK status, aka nothing to do.
147+
// (This almost always points to ImGui::GetPlatformIO().Textures[] but is part of ImDrawData to allow overriding or disabling texture updates).
148+
if (draw_data->Textures != nullptr)
149+
for (ImTextureData* tex : *draw_data->Textures)
150+
if (tex->Status != ImTextureStatus_OK)
151+
ImGui_ImplAllegro5_UpdateTexture(tex);
152+
139153
// Backup Allegro state that will be modified
140154
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
141155
ALLEGRO_TRANSFORM last_transform = *al_get_current_transform();
@@ -149,10 +163,8 @@ void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data)
149163
ImGui_ImplAllegro5_SetupRenderState(draw_data);
150164

151165
// Render command lists
152-
for (int n = 0; n < draw_data->CmdListsCount; n++)
166+
for (const ImDrawList* draw_list : draw_data->CmdLists)
153167
{
154-
const ImDrawList* draw_list = draw_data->CmdLists[n];
155-
156168
ImVector<ImDrawVertAllegro>& vertices = bd->BufVertices;
157169
#if ALLEGRO_HAS_DRAW_INDEXED_PRIM
158170
vertices.resize(draw_list->VtxBuffer.Size);
@@ -231,43 +243,7 @@ void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data)
231243

232244
bool ImGui_ImplAllegro5_CreateDeviceObjects()
233245
{
234-
// Build texture atlas
235246
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
236-
ImGuiIO& io = ImGui::GetIO();
237-
unsigned char* pixels;
238-
int width, height;
239-
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
240-
241-
// Create texture
242-
// (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
243-
int flags = al_get_new_bitmap_flags();
244-
int fmt = al_get_new_bitmap_format();
245-
al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP | ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR);
246-
al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE);
247-
ALLEGRO_BITMAP* img = al_create_bitmap(width, height);
248-
al_set_new_bitmap_flags(flags);
249-
al_set_new_bitmap_format(fmt);
250-
if (!img)
251-
return false;
252-
253-
ALLEGRO_LOCKED_REGION* locked_img = al_lock_bitmap(img, al_get_bitmap_format(img), ALLEGRO_LOCK_WRITEONLY);
254-
if (!locked_img)
255-
{
256-
al_destroy_bitmap(img);
257-
return false;
258-
}
259-
memcpy(locked_img->data, pixels, sizeof(int) * width * height);
260-
al_unlock_bitmap(img);
261-
262-
// Convert software texture to hardware texture.
263-
ALLEGRO_BITMAP* cloned_img = al_clone_bitmap(img);
264-
al_destroy_bitmap(img);
265-
if (!cloned_img)
266-
return false;
267-
268-
// Store our identifier
269-
io.Fonts->SetTexID((ImTextureID)(intptr_t)cloned_img);
270-
bd->Texture = cloned_img;
271247

272248
// Create an invisible mouse cursor
273249
// Because al_hide_mouse_cursor() seems to mess up with the actual inputs..
@@ -278,16 +254,82 @@ bool ImGui_ImplAllegro5_CreateDeviceObjects()
278254
return true;
279255
}
280256

281-
void ImGui_ImplAllegro5_InvalidateDeviceObjects()
257+
void ImGui_ImplAllegro5_UpdateTexture(ImTextureData* tex)
282258
{
283-
ImGuiIO& io = ImGui::GetIO();
284-
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
285-
if (bd->Texture)
259+
if (tex->Status == ImTextureStatus_WantCreate)
260+
{
261+
// Create and upload new texture to graphics system
262+
//IMGUI_DEBUG_LOG("UpdateTexture #%03d: WantCreate %dx%d\n", tex->UniqueID, tex->Width, tex->Height);
263+
IM_ASSERT(tex->TexID == ImTextureID_Invalid && tex->BackendUserData == nullptr);
264+
IM_ASSERT(tex->Format == ImTextureFormat_RGBA32);
265+
266+
// Create texture
267+
// (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling)
268+
const int new_bitmap_flags = al_get_new_bitmap_flags();
269+
int new_bitmap_format = al_get_new_bitmap_format();
270+
al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP | ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR);
271+
al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE);
272+
ALLEGRO_BITMAP* cpu_bitmap = al_create_bitmap(tex->Width, tex->Height);
273+
IM_ASSERT(cpu_bitmap != nullptr && "Backend failed to create texture!");
274+
275+
// Upload pixels
276+
ALLEGRO_LOCKED_REGION* locked_region = al_lock_bitmap(cpu_bitmap, al_get_bitmap_format(cpu_bitmap), ALLEGRO_LOCK_WRITEONLY);
277+
IM_ASSERT(locked_region != nullptr && "Backend failed to create texture!");
278+
memcpy(locked_region->data, tex->GetPixels(), tex->GetSizeInBytes());
279+
al_unlock_bitmap(cpu_bitmap);
280+
281+
// Convert software texture to hardware texture.
282+
al_set_new_bitmap_flags(ALLEGRO_VIDEO_BITMAP);
283+
al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_ANY_32_WITH_ALPHA);
284+
ALLEGRO_BITMAP* gpu_bitmap = al_clone_bitmap(cpu_bitmap);
285+
al_destroy_bitmap(cpu_bitmap);
286+
IM_ASSERT(gpu_bitmap != nullptr && "Backend failed to create texture!");
287+
288+
al_set_new_bitmap_flags(new_bitmap_flags);
289+
al_set_new_bitmap_format(new_bitmap_format);
290+
291+
// Store identifiers
292+
tex->SetTexID((ImTextureID)(intptr_t)gpu_bitmap);
293+
tex->SetStatus(ImTextureStatus_OK);
294+
}
295+
else if (tex->Status == ImTextureStatus_WantUpdates)
286296
{
287-
io.Fonts->SetTexID(0);
288-
al_destroy_bitmap(bd->Texture);
289-
bd->Texture = nullptr;
297+
// Update selected blocks. We only ever write to textures regions which have never been used before!
298+
// This backend choose to use tex->Updates[] but you can use tex->UpdateRect to upload a single region.
299+
ImTextureRect r = tex->UpdateRect; // Bounding box encompassing all individual updates
300+
ALLEGRO_BITMAP* gpu_bitmap = (ALLEGRO_BITMAP*)(intptr_t)tex->TexID;
301+
ALLEGRO_LOCKED_REGION* locked_region = al_lock_bitmap_region(gpu_bitmap, r.x, r.y, r.w, r.h, al_get_bitmap_format(gpu_bitmap), ALLEGRO_LOCK_WRITEONLY);
302+
IM_ASSERT(locked_region && "Backend failed to update texture!");
303+
for (int y = 0; y < r.h; y++)
304+
memcpy((unsigned char*)locked_region->data + locked_region->pitch * y, tex->GetPixelsAt(r.x, r.y + y), r.w * tex->BytesPerPixel); // dst, src, block pitch
305+
al_unlock_bitmap(gpu_bitmap);
306+
tex->SetStatus(ImTextureStatus_OK);
290307
}
308+
else if (tex->Status == ImTextureStatus_WantDestroy)
309+
{
310+
ALLEGRO_BITMAP* backend_tex = (ALLEGRO_BITMAP*)(intptr_t)tex->TexID;
311+
if (backend_tex)
312+
al_destroy_bitmap(backend_tex);
313+
314+
// Clear identifiers and mark as destroyed (in order to allow e.g. calling InvalidateDeviceObjects while running)
315+
tex->SetTexID(ImTextureID_Invalid);
316+
tex->SetStatus(ImTextureStatus_Destroyed);
317+
}
318+
}
319+
320+
void ImGui_ImplAllegro5_InvalidateDeviceObjects()
321+
{
322+
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
323+
324+
// Destroy all textures
325+
for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
326+
if (tex->RefCount == 1)
327+
{
328+
tex->SetStatus(ImTextureStatus_WantDestroy);
329+
ImGui_ImplAllegro5_UpdateTexture(tex);
330+
}
331+
332+
// Destroy mouse cursor
291333
if (bd->MouseCursorInvisible)
292334
{
293335
al_destroy_mouse_cursor(bd->MouseCursorInvisible);
@@ -438,21 +480,11 @@ bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display)
438480
io.BackendPlatformUserData = (void*)bd;
439481
io.BackendPlatformName = io.BackendRendererName = "imgui_impl_allegro5";
440482
io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
483+
io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures; // We can honor ImGuiPlatformIO::Textures[] requests during render.
441484

442-
bd->Display = display;
443485
bd->LastCursor = ALLEGRO_SYSTEM_MOUSE_CURSOR_NONE;
444486

445-
// Create custom vertex declaration.
446-
// Unfortunately Allegro doesn't support 32-bit packed colors so we have to convert them to 4 floats.
447-
// We still use a custom declaration to use 'ALLEGRO_PRIM_TEX_COORD' instead of 'ALLEGRO_PRIM_TEX_COORD_PIXEL' else we can't do a reliable conversion.
448-
ALLEGRO_VERTEX_ELEMENT elems[] =
449-
{
450-
{ ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, pos) },
451-
{ ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, uv) },
452-
{ ALLEGRO_PRIM_COLOR_ATTR, 0, offsetof(ImDrawVertAllegro, col) },
453-
{ 0, 0, 0 }
454-
};
455-
bd->VertexDecl = al_create_vertex_decl(elems, sizeof(ImDrawVertAllegro));
487+
ImGui_ImplAllegro5_SetDisplay(display);
456488

457489
#if ALLEGRO_HAS_CLIPBOARD
458490
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
@@ -468,6 +500,7 @@ void ImGui_ImplAllegro5_Shutdown()
468500
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
469501
IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
470502
ImGuiIO& io = ImGui::GetIO();
503+
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
471504

472505
ImGui_ImplAllegro5_InvalidateDeviceObjects();
473506
if (bd->VertexDecl)
@@ -477,10 +510,39 @@ void ImGui_ImplAllegro5_Shutdown()
477510

478511
io.BackendPlatformName = io.BackendRendererName = nullptr;
479512
io.BackendPlatformUserData = nullptr;
480-
io.BackendFlags &= ~ImGuiBackendFlags_HasMouseCursors;
513+
io.BackendFlags &= ~(ImGuiBackendFlags_HasMouseCursors | ImGuiBackendFlags_RendererHasTextures);
514+
platform_io.ClearRendererHandlers();
515+
platform_io.ClearPlatformHandlers();
481516
IM_DELETE(bd);
482517
}
483518

519+
void ImGui_ImplAllegro5_SetDisplay(ALLEGRO_DISPLAY* display)
520+
{
521+
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
522+
bd->Display = display;
523+
524+
if (bd->VertexDecl)
525+
{
526+
al_destroy_vertex_decl(bd->VertexDecl);
527+
bd->VertexDecl = NULL;
528+
}
529+
530+
if (bd->Display && !bd->VertexDecl)
531+
{
532+
// Create custom vertex declaration.
533+
// Unfortunately Allegro doesn't support 32-bits packed colors so we have to convert them to 4 floats.
534+
// We still use a custom declaration to use 'ALLEGRO_PRIM_TEX_COORD' instead of 'ALLEGRO_PRIM_TEX_COORD_PIXEL' else we can't do a reliable conversion.
535+
ALLEGRO_VERTEX_ELEMENT elems[] =
536+
{
537+
{ ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, pos) },
538+
{ ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, uv) },
539+
{ ALLEGRO_PRIM_COLOR_ATTR, 0, offsetof(ImDrawVertAllegro, col) },
540+
{ 0, 0, 0 }
541+
};
542+
bd->VertexDecl = al_create_vertex_decl(elems, sizeof(ImDrawVertAllegro));
543+
}
544+
}
545+
484546
// ev->keyboard.modifiers seems always zero so using that...
485547
static void ImGui_ImplAllegro5_UpdateKeyModifiers()
486548
{
@@ -594,6 +656,8 @@ static void ImGui_ImplAllegro5_UpdateMouseCursor()
594656
case ImGuiMouseCursor_ResizeEW: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E; break;
595657
case ImGuiMouseCursor_ResizeNESW: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE; break;
596658
case ImGuiMouseCursor_ResizeNWSE: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW; break;
659+
case ImGuiMouseCursor_Wait: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_BUSY; break;
660+
case ImGuiMouseCursor_Progress: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_PROGRESS; break;
597661
case ImGuiMouseCursor_NotAllowed: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_UNAVAILABLE; break;
598662
}
599663
al_set_system_mouse_cursor(bd->Display, cursor_id);
@@ -605,12 +669,11 @@ void ImGui_ImplAllegro5_NewFrame()
605669
ImGui_ImplAllegro5_Data* bd = ImGui_ImplAllegro5_GetBackendData();
606670
IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplAllegro5_Init()?");
607671

608-
if (!bd->Texture)
672+
if (!bd->MouseCursorInvisible)
609673
ImGui_ImplAllegro5_CreateDeviceObjects();
610674

611-
ImGuiIO& io = ImGui::GetIO();
612-
613675
// Setup display size (every frame to accommodate for window resizing)
676+
ImGuiIO& io = ImGui::GetIO();
614677
int w, h;
615678
w = al_get_display_width(bd->Display);
616679
h = al_get_display_height(bd->Display);
@@ -621,6 +684,11 @@ void ImGui_ImplAllegro5_NewFrame()
621684
io.DeltaTime = bd->Time > 0.0 ? (float)(current_time - bd->Time) : (float)(1.0f / 60.0f);
622685
bd->Time = current_time;
623686

687+
// Allegro 5 doesn't receive PrintScreen under Windows
688+
#ifdef _WIN32
689+
io.AddKeyEvent(ImGuiKey_PrintScreen, (::GetAsyncKeyState(VK_SNAPSHOT) & 0x8000) != 0);
690+
#endif
691+
624692
// Setup mouse cursor shape
625693
ImGui_ImplAllegro5_UpdateMouseCursor();
626694
}

neo/libs/imgui/backends/imgui_impl_allegro5.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.)
33

44
// Implemented features:
5-
// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID!
5+
// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
6+
// [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
67
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values are obsolete since 1.87 and not supported since 1.91.5]
78
// [X] Platform: Clipboard support (from Allegro 5.1.12).
89
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
@@ -31,9 +32,13 @@ IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown();
3132
IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame();
3233
IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data);
3334
IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event);
35+
IMGUI_IMPL_API void ImGui_ImplAllegro5_SetDisplay(ALLEGRO_DISPLAY* display);
3436

3537
// Use if you want to reset your rendering device without losing Dear ImGui state.
3638
IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects();
3739
IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects();
3840

41+
// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
42+
IMGUI_IMPL_API void ImGui_ImplAllegro5_UpdateTexture(ImTextureData* tex);
43+
3944
#endif // #ifndef IMGUI_DISABLE

neo/libs/imgui/backends/imgui_impl_android.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
77
// Missing features or Issues:
88
// [ ] Platform: Clipboard support.
9-
// [ ] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
9+
// [ ] Platform: Gamepad support.
1010
// [ ] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
1111
// Important:
1212
// - Consider using SDL or GLFW backend on Android, which will be more full-featured than this.

0 commit comments

Comments
 (0)