Backends: SDLGPU3: Fixed creating atlas texture earlier than other backends.

# Conflicts:
#	backends/imgui_impl_sdlgpu3.cpp
This commit is contained in:
ocornut
2025-05-05 19:19:33 +02:00
parent e3bfaab3f7
commit c5e2bb7cd1
2 changed files with 4 additions and 2 deletions

View File

@@ -589,8 +589,6 @@ bool ImGui_ImplSDLGPU3_Init(ImGui_ImplSDLGPU3_InitInfo* info)
bd->InitInfo = *info; bd->InitInfo = *info;
ImGui_ImplSDLGPU3_CreateDeviceObjects();
return true; return true;
} }
@@ -612,6 +610,8 @@ void ImGui_ImplSDLGPU3_NewFrame()
ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData(); ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData();
IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDLGPU3_Init()?"); IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplSDLGPU3_Init()?");
if (!bd->FontSampler)
ImGui_ImplSDLGPU3_CreateDeviceObjects();
if (!bd->FontTexture) if (!bd->FontTexture)
ImGui_ImplSDLGPU3_CreateFontsTexture(); ImGui_ImplSDLGPU3_CreateFontsTexture();
} }

View File

@@ -111,6 +111,8 @@ Other changes:
memory ownership change. (#8530, #7801) [@Green-Sky] memory ownership change. (#8530, #7801) [@Green-Sky]
- Backends: SDL3: honor ImGuiPlatformImeData->WantTextInput as an alternative - Backends: SDL3: honor ImGuiPlatformImeData->WantTextInput as an alternative
way to call SDL_StartTextInput(), without IME being necessarily visible. (#8584) 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 - Backends: SDLGPU3: Made ImGui_ImplSDLGPU3_PrepareDrawData() reuse GPU Transfer Buffers which
were unusually slow to recreate every frame. Much faster now. (#8534) [@ocornut, @TheMode] were unusually slow to recreate every frame. Much faster now. (#8534) [@ocornut, @TheMode]
- Backends: SDLGPU3: added support for ImDrawCallback_ResetRenderState. (#8599) - Backends: SDLGPU3: added support for ImDrawCallback_ResetRenderState. (#8599)