From 00f33e592af2abcd9d3b17b6af6501e7c33a62c2 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Sun, 11 Oct 2026 12:50:06 +0200 Subject: [PATCH] refactor(sonar): imgui update --- betterRenderer/renderer/source/imgui_nvrhi.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/betterRenderer/renderer/source/imgui_nvrhi.cpp b/betterRenderer/renderer/source/imgui_nvrhi.cpp index 70757c1f..f1ed4d61 100644 --- a/betterRenderer/renderer/source/imgui_nvrhi.cpp +++ b/betterRenderer/renderer/source/imgui_nvrhi.cpp @@ -92,7 +92,8 @@ bool ImGui_NVRHI::createFontTexture(nvrhi::ICommandList* commandList) commandList->setPermanentTextureState(fontTexture, nvrhi::ResourceStates::ShaderResource); commandList->commitBarriers(); - io.Fonts->TexID = fontTexture; + // since imgui 1.91 ImTextureID is an integer, not a pointer + io.Fonts->TexID = static_cast(reinterpret_cast(fontTexture.Get())); } { @@ -371,7 +372,7 @@ bool ImGui_NVRHI::render(nvrhi::IFramebuffer* framebuffer) { pCmd->UserCallback(cmdList, pCmd); } else { - drawState.bindings = { getBindingSet(pCmd->TextureId) }; + drawState.bindings = { getBindingSet(reinterpret_cast(static_cast(pCmd->GetTexID()))) }; assert(drawState.bindings[0]); drawState.viewport.scissorRects[0] = nvrhi::Rect(int(pCmd->ClipRect.x),