diff --git a/backends/imgui_impl_sdlgpu3.cpp b/backends/imgui_impl_sdlgpu3.cpp index b277512cc..4bcc5bdfc 100644 --- a/backends/imgui_impl_sdlgpu3.cpp +++ b/backends/imgui_impl_sdlgpu3.cpp @@ -589,8 +589,6 @@ bool ImGui_ImplSDLGPU3_Init(ImGui_ImplSDLGPU3_InitInfo* info) bd->InitInfo = *info; - ImGui_ImplSDLGPU3_CreateDeviceObjects(); - return true; } @@ -612,6 +610,8 @@ void ImGui_ImplSDLGPU3_NewFrame() ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData(); IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDLGPU3_Init()?"); + if (!bd->FontSampler) + ImGui_ImplSDLGPU3_CreateDeviceObjects(); if (!bd->FontTexture) ImGui_ImplSDLGPU3_CreateFontsTexture(); } diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 9a221b949..ceb7bfcf7 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -111,6 +111,8 @@ Other changes: memory ownership change. (#8530, #7801) [@Green-Sky] - Backends: SDL3: honor ImGuiPlatformImeData->WantTextInput as an alternative way to call SDL_StartTextInput(), without IME being necessarily visible. (#8584) +- Backends: SDLGPU3: Fixed creating atlas texture earlier than other backends, preventing + to load fonts between the Init and NewFrames calls. - Backends: SDLGPU3: Made ImGui_ImplSDLGPU3_PrepareDrawData() reuse GPU Transfer Buffers which were unusually slow to recreate every frame. Much faster now. (#8534) [@ocornut, @TheMode] - Backends: SDLGPU3: added support for ImDrawCallback_ResetRenderState. (#8599)