Skip to content

Commit 44e7afe

Browse files
authored
Merge branch 'ocornut:master' into gamepad-poll-events
2 parents 74f11ae + 702a678 commit 44e7afe

25 files changed

+155
-102
lines changed

backends/imgui_impl_android.cpp

+1-1
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.

backends/imgui_impl_android.h

+1-1
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.

backends/imgui_impl_glfw.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ static inline float Saturate(float v) { return v < 0.0f ? 0.0f : v > 1.0f ? 1.0
789789
static void ImGui_ImplGlfw_UpdateGamepads()
790790
{
791791
ImGuiIO& io = ImGui::GetIO();
792-
if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs.
792+
if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs, but see #8075
793793
return;
794794

795795
io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad;

backends/imgui_impl_osx.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// [X] Platform: Clipboard support is part of core Dear ImGui (no specific code in this backend).
88
// [X] Platform: Mouse support. Can discriminate Mouse/Pen.
99
// [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 kVK_* values are obsolete since 1.87 and not supported since 1.91.5]
10-
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
10+
// [X] Platform: Gamepad support.
1111
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
1212
// [X] Platform: IME support.
1313
// Missing features or Issues:

backends/imgui_impl_osx.mm

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// [X] Platform: Clipboard support is part of core Dear ImGui (no specific code in this backend).
88
// [X] Platform: Mouse support. Can discriminate Mouse/Pen.
99
// [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 kVK_* values are obsolete since 1.87 and not supported since 1.91.5]
10-
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
10+
// [X] Platform: Gamepad support.
1111
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
1212
// [X] Platform: IME support.
1313
// Missing features or Issues:
@@ -31,6 +31,7 @@
3131

3232
// CHANGELOG
3333
// (minor and older changes stripped away, please see git history for details)
34+
// 2025-03-21: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad regardless of ImGuiConfigFlags_NavEnableGamepad being set.
3435
// 2025-01-20: Removed notification observer when shutting down. (#8331)
3536
// 2024-08-22: moved some OS/backend related function pointers from ImGuiIO to ImGuiPlatformIO:
3637
// - io.GetClipboardTextFn -> platform_io.Platform_GetClipboardTextFn
@@ -536,7 +537,7 @@ static void ImGui_ImplOSX_UpdateMouseCursor()
536537
else
537538
{
538539
NSCursor* desired = bd->MouseCursors[imgui_cursor] ?: bd->MouseCursors[ImGuiMouseCursor_Arrow];
539-
// -[NSCursor set] generates measureable overhead if called unconditionally.
540+
// -[NSCursor set] generates measurable overhead if called unconditionally.
540541
if (desired != NSCursor.currentCursor)
541542
{
542543
[desired set];
@@ -552,8 +553,6 @@ static void ImGui_ImplOSX_UpdateMouseCursor()
552553
static void ImGui_ImplOSX_UpdateGamepads()
553554
{
554555
ImGuiIO& io = ImGui::GetIO();
555-
if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs.
556-
return;
557556

558557
#if APPLE_HAS_CONTROLLER
559558
GCController* controller = GCController.current;

backends/imgui_impl_sdl2.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// [X] Platform: Clipboard support.
88
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen.
99
// [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 SDL_SCANCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
10-
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
10+
// [X] Platform: Gamepad support.
1111
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
1212
// [X] Platform: Basic IME support. App needs to call 'SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");' before SDL_CreateWindow()!.
1313

@@ -21,6 +21,7 @@
2121

2222
// CHANGELOG
2323
// (minor and older changes stripped away, please see git history for details)
24+
// 2025-03-21: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad regardless of ImGuiConfigFlags_NavEnableGamepad being set.
2425
// 2025-03-10: When dealing with OEM keys, use scancodes instead of translated keycodes to choose ImGuiKey values. (#7136, #7201, #7206, #7306, #7670, #7672, #8468)
2526
// 2025-02-26: Only start SDL_CaptureMouse() when mouse is being dragged, to mitigate issues with e.g.Linux debuggers not claiming capture back. (#6410, #3650)
2627
// 2025-02-24: Avoid calling SDL_GetGlobalMouseState() when mouse is in relative mode.

backends/imgui_impl_sdl2.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// [X] Platform: Clipboard support.
77
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen.
88
// [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 SDL_SCANCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
9-
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
9+
// [X] Platform: Gamepad support.
1010
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
1111
// [X] Platform: Basic IME support. App needs to call 'SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");' before SDL_CreateWindow()!.
1212

backends/imgui_impl_sdl3.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// [X] Platform: Clipboard support.
77
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen.
88
// [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 SDL_SCANCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
9-
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
9+
// [X] Platform: Gamepad support.
1010
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
1111
// [X] Platform: IME support.
1212

@@ -20,6 +20,7 @@
2020

2121
// CHANGELOG
2222
// (minor and older changes stripped away, please see git history for details)
23+
// 2025-03-21: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad regardless of ImGuiConfigFlags_NavEnableGamepad being set.
2324
// 2025-03-10: When dealing with OEM keys, use scancodes instead of translated keycodes to choose ImGuiKey values. (#7136, #7201, #7206, #7306, #7670, #7672, #8468)
2425
// 2025-02-26: Only start SDL_CaptureMouse() when mouse is being dragged, to mitigate issues with e.g.Linux debuggers not claiming capture back. (#6410, #3650)
2526
// 2025-02-24: Avoid calling SDL_GetGlobalMouseState() when mouse is in relative mode.

backends/imgui_impl_sdl3.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// [X] Platform: Clipboard support.
77
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen.
88
// [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 SDL_SCANCODE_* values are obsolete since 1.87 and not supported since 1.91.5]
9-
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
9+
// [X] Platform: Gamepad support.
1010
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
1111
// [X] Platform: IME support.
1212

backends/imgui_impl_sdlgpu3.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
// - Introduction, links and more at the top of imgui.cpp
1818

1919
// Important note to the reader who wish to integrate imgui_impl_sdlgpu3.cpp/.h in their own engine/app.
20-
// - Unlike other backends, the user must call the function Imgui_ImplSDLGPU3_PrepareDrawData() BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU3_RenderDrawData.
20+
// - Unlike other backends, the user must call the function ImGui_ImplSDLGPU3_PrepareDrawData() BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU3_RenderDrawData.
2121
// Calling the function is MANDATORY, otherwise the ImGui will not upload neither the vertex nor the index buffer for the GPU. See imgui_impl_sdlgpu3.cpp for more info.
2222

2323
// CHANGELOG
24+
// 2025-03-21: Fixed typo in function name Imgui_ImplSDLGPU3_PrepareDrawData() -> ImGui_ImplSDLGPU3_PrepareDrawData().
2425
// 2025-01-16: Renamed ImGui_ImplSDLGPU3_InitInfo::GpuDevice to Device.
2526
// 2025-01-09: SDL_GPU: Added the SDL_GPU3 backend.
2627

@@ -134,7 +135,7 @@ static void CreateOrResizeBuffer(SDL_GPUBuffer** buffer, uint32_t* old_size, uin
134135
// SDL_GPU doesn't allow copy passes to occur while a render or compute pass is bound!
135136
// The only way to allow a user to supply their own RenderPass (to render to a texture instead of the window for example),
136137
// is to split the upload part of ImGui_ImplSDLGPU3_RenderDrawData() to another function that needs to be called by the user before rendering.
137-
void Imgui_ImplSDLGPU3_PrepareDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer)
138+
void ImGui_ImplSDLGPU3_PrepareDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer)
138139
{
139140
// Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
140141
int fb_width = (int)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x);
@@ -366,7 +367,7 @@ void ImGui_ImplSDLGPU3_DestroyFontsTexture()
366367
io.Fonts->SetTexID(0);
367368
}
368369

369-
static void Imgui_ImplSDLGPU3_CreateShaders()
370+
static void ImGui_ImplSDLGPU3_CreateShaders()
370371
{
371372
// Create the shader modules
372373
ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
@@ -431,7 +432,7 @@ static void ImGui_ImplSDLGPU3_CreateGraphicsPipeline()
431432
{
432433
ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
433434
ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo;
434-
Imgui_ImplSDLGPU3_CreateShaders();
435+
ImGui_ImplSDLGPU3_CreateShaders();
435436

436437
SDL_GPUVertexBufferDescription vertex_buffer_desc[1];
437438
vertex_buffer_desc[0].slot = 0;

backends/imgui_impl_sdlgpu3.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// - Introduction, links and more at the top of imgui.cpp
1818

1919
// Important note to the reader who wish to integrate imgui_impl_sdlgpu3.cpp/.h in their own engine/app.
20-
// - Unline other backends, the user must call the function Imgui_ImplSDLGPU_PrepareDrawData BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU_RenderDrawData.
20+
// - Unlike other backends, the user must call the function ImGui_ImplSDLGPU_PrepareDrawData BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU_RenderDrawData.
2121
// Calling the function is MANDATORY, otherwise the ImGui will not upload neither the vertex nor the index buffer for the GPU. See imgui_impl_sdlgpu3.cpp for more info.
2222

2323
#pragma once
@@ -38,7 +38,7 @@ struct ImGui_ImplSDLGPU3_InitInfo
3838
IMGUI_IMPL_API bool ImGui_ImplSDLGPU3_Init(ImGui_ImplSDLGPU3_InitInfo* info);
3939
IMGUI_IMPL_API void ImGui_ImplSDLGPU3_Shutdown();
4040
IMGUI_IMPL_API void ImGui_ImplSDLGPU3_NewFrame();
41-
IMGUI_IMPL_API void Imgui_ImplSDLGPU3_PrepareDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer);
41+
IMGUI_IMPL_API void ImGui_ImplSDLGPU3_PrepareDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer);
4242
IMGUI_IMPL_API void ImGui_ImplSDLGPU3_RenderDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer, SDL_GPURenderPass* render_pass, SDL_GPUGraphicsPipeline* pipeline = nullptr);
4343

4444
IMGUI_IMPL_API void ImGui_ImplSDLGPU3_CreateDeviceObjects();

backends/imgui_impl_win32.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// [X] Platform: Clipboard support (for Win32 this is actually part of core dear imgui)
66
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
77
// [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 VK_* values are obsolete since 1.87 and not supported since 1.91.5]
8-
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
8+
// [X] Platform: Gamepad support.
99
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
1010

1111
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
@@ -335,8 +335,6 @@ static void ImGui_ImplWin32_UpdateGamepads(ImGuiIO& io)
335335
{
336336
#ifndef IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
337337
ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData(io);
338-
//if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs.
339-
// return;
340338

341339
// Calling XInputGetState() every frame on disconnected gamepads is unfortunately too slow.
342340
// Instead we refresh gamepad availability by calling XInputGetCapabilities() _only_ after receiving WM_DEVICECHANGE.

backends/imgui_impl_win32.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// [X] Platform: Clipboard support (for Win32 this is actually part of core dear imgui)
66
// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
77
// [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 VK_* values are obsolete since 1.87 and not supported since 1.91.5]
8-
// [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
8+
// [X] Platform: Gamepad support.
99
// [X] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
1010

1111
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.

docs/CHANGELOG.txt

+35-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,38 @@ HOW TO UPDATE?
3535
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
3636
- Please report any issue!
3737

38+
-----------------------------------------------------------------------
39+
VERSION 1.92.0 WIP (In Progress)
40+
-----------------------------------------------------------------------
41+
42+
Breaking changes:
43+
44+
- Backends: SDL3: Fixed casing typo in function name: (#8509, #8163, #7998, #7988) [@puugz]
45+
- Imgui_ImplSDLGPU3_PrepareDrawData() -> ImGui_ImplSDLGPU3_PrepareDrawData()
46+
47+
Other changes:
48+
49+
- IO: variations in analog-only components of gamepad events do not interfere
50+
with trickling of mouse position events (#4921, #8508)
51+
- Error Handling: added better error report and recovery for extraneous
52+
EndPopup() call. (#1651, #8499)
53+
- Style, InputText: added ImGuiCol_InputTextCursor to configure color of
54+
the InputText cursor/caret. (#7031)
55+
- Backends: SDL2, SDL3, OSX: Fill gamepad inputs and set ImGuiBackendFlags_HasGamepad
56+
regardless of ImGuiConfigFlags_NavEnableGamepad being set. (#8508)
57+
58+
59+
-----------------------------------------------------------------------
60+
VERSION 1.91.9b (Released 2025-03-17)
61+
-----------------------------------------------------------------------
62+
63+
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.91.9b
64+
65+
- Tables: Fixed assert when loading .ini settings with reordered columns. (#8496, #7934)
66+
- Tables: Fixed issues when loading .ini settings for a table with columns using
67+
ImGuiTableColumnFlags_DefaultHide or ImGuiTableColumnFlags_DefaultSort. (#8496, #7934)
68+
69+
3870
-----------------------------------------------------------------------
3971
VERSION 1.91.9 (Released 2025-03-14)
4072
-----------------------------------------------------------------------
@@ -64,6 +96,8 @@ Breaking changes:
6496
- Backends: Vulkan: Added 'uint32_t api_version' argument to ImGui_ImplVulkan_LoadFunctions().
6597
Note that it was also added to ImGui_ImplVulkan_InitInfo but for the later it is optional.
6698
(#8326, #8365, #8400)
99+
- Internals: Fonts: ImFontAtlas::ConfigData[] has been renamed to ImFontAtlas::Sources[],
100+
- Internals: Fonts: ImFont::ConfigData[], ConfigDataCount has been renamed to Sources[], SourcesCount.
67101
- Internals: Menus: reworked mangling of menu windows to use "###Menu_00" etc. instead
68102
of "##Menu_00", allowing them to also store the menu name before it. This shouldn't
69103
affect code unless directly accessing menu window from their mangled name.
@@ -602,7 +636,7 @@ Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v
602636

603637
Breaking changes:
604638

605-
- Internals: using multiple overlayed ButtonBehavior() with same ID will now have the
639+
- Internals: using multiple overlaid ButtonBehavior() with same ID will now have the
606640
io.ConfigDebugHighlightIdConflicts=true feature emit a warning. (#8030)
607641
It was one of the rare case where using same ID is legal. Workarounds:
608642
- use single ButtonBehavior() call with multiple _MouseButton flags

examples/example_sdl3_sdlgpu3/main.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// - Introduction, links and more at the top of imgui.cpp
88

99
// Important note to the reader who wish to integrate imgui_impl_sdlgpu3.cpp/.h in their own engine/app.
10-
// - Unlike other backends, the user must call the function Imgui_ImplSDLGPU_PrepareDrawData() BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU_RenderDrawData.
10+
// - Unlike other backends, the user must call the function ImGui_ImplSDLGPU_PrepareDrawData() BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU_RenderDrawData.
1111
// Calling the function is MANDATORY, otherwise the ImGui will not upload neither the vertex nor the index buffer for the GPU. See imgui_impl_sdlgpu3.cpp for more info.
1212

1313
#include "imgui.h"
@@ -178,8 +178,8 @@ int main(int, char**)
178178

179179
if (swapchain_texture != nullptr && !is_minimized)
180180
{
181-
// This is mandatory: call Imgui_ImplSDLGPU3_PrepareDrawData() to upload the vertex/index buffer!
182-
Imgui_ImplSDLGPU3_PrepareDrawData(draw_data, command_buffer);
181+
// This is mandatory: call ImGui_ImplSDLGPU3_PrepareDrawData() to upload the vertex/index buffer!
182+
ImGui_ImplSDLGPU3_PrepareDrawData(draw_data, command_buffer);
183183

184184
// Setup and start a render pass
185185
SDL_GPUColorTargetInfo target_info = {};

0 commit comments

Comments
 (0)