From 93e396ffb75834b4fa79004a4f0fccb600a8e164 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 15 May 2026 16:38:05 +0200 Subject: [PATCH] Textures: call ImTextureDataUpdateNewFrame() for textures registered via RegisterUserTexture(). (#8789, #8465) Amend --- imgui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index c7557c8b9..aa5fa6a18 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -8976,6 +8976,8 @@ static void ImGui::UpdateTexturesNewFrame() IM_ASSERT(atlas->RendererHasTextures == has_textures); } } + for (ImTextureData* tex : g.UserTextures) + ImTextureDataUpdateNewFrame(tex); } // Build a single texture list @@ -9037,7 +9039,7 @@ ImFont* ImGui::GetDefaultFont() return g.IO.FontDefault ? g.IO.FontDefault : atlas->Fonts[0]; } -// EXPERIMENTAL. Use ImTextureDataQueueUpload() to queue updates. +// EXPERIMENTAL. Use ImTextureDataQueueUpload() to queue updates. Textures logic will be automatically be updated in NewFrame(). void ImGui::RegisterUserTexture(ImTextureData* tex) { ImGuiContext& g = *GImGui;