Skip to content

Commit 596e097

Browse files
committed
Backends: SDL3: Added ImGui_ImplSDL3_InitForSDLGPU() for consistency. (#8163, #7998, #7988)
1 parent e799849 commit 596e097

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

backends/imgui_impl_sdl3.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,11 @@ bool ImGui_ImplSDL3_InitForSDLRenderer(SDL_Window* window, SDL_Renderer* rendere
531531
return ImGui_ImplSDL3_Init(window, renderer, nullptr);
532532
}
533533

534+
bool ImGui_ImplSDL3_InitForSDLGPU(SDL_Window* window)
535+
{
536+
return ImGui_ImplSDL3_Init(window, nullptr, nullptr);
537+
}
538+
534539
bool ImGui_ImplSDL3_InitForOther(SDL_Window* window)
535540
{
536541
return ImGui_ImplSDL3_Init(window, nullptr, nullptr);

backends/imgui_impl_sdl3.h

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForVulkan(SDL_Window* window);
3535
IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForD3D(SDL_Window* window);
3636
IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForMetal(SDL_Window* window);
3737
IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForSDLRenderer(SDL_Window* window, SDL_Renderer* renderer);
38+
IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForSDLGPU(SDL_Window* window);
3839
IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForOther(SDL_Window* window);
3940
IMGUI_IMPL_API void ImGui_ImplSDL3_Shutdown();
4041
IMGUI_IMPL_API void ImGui_ImplSDL3_NewFrame();

docs/CHANGELOG.txt

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Other changes:
6969
- Misc: Fixed misc/cpp/imgui_stdlib.h/.cpp not supporting IMGUI_DISABLE. (#8294) [@juur]
7070
- Misc: Fixed MinGW builds uses UTF-8 friendly _wfopen(). (#8300)
7171
- Backends: SDL_GPU for SDL3: Added backend for SDL_GPU! (#8163, #7998, #7988) [@DeltaW0x].
72+
- Backends: SDL3: Added ImGui_ImplSDL3_InitForSDLGPU() for consistency, even
73+
though it is currently not doing anything particular. (#8163, #7998, #7988)
7274
- Backends: Allegro5: Avoid calling al_set_mouse_cursor() repeatedly since it appears
7375
to leak on on X11 (#8256). [@Helodity]
7476
- Backends: Metal: Fixed leaks when using metal-cpp. (#8276, #8166) [@selimsandal]

examples/example_sdl3_sdlgpu3/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int main(int, char**)
6767
//ImGui::StyleColorsLight();
6868

6969
// Setup Platform/Renderer backends
70-
ImGui_ImplSDL3_InitForOther(window);
70+
ImGui_ImplSDL3_InitForSDLGPU(window);
7171
ImGui_ImplSDLGPU3_InitInfo init_info = {};
7272
init_info.GpuDevice = gpu_device;
7373
init_info.ColorTargetFormat = SDL_GetGPUSwapchainTextureFormat(gpu_device, window);

0 commit comments

Comments
 (0)