From 9c0805010f268eb182728cf6c188cf628a9088a2 Mon Sep 17 00:00:00 2001 From: Ryan Crandall Date: Thu, 9 Aug 2018 08:44:29 -0700 Subject: [PATCH] imgui_impl_dx12: Cast to ImTextureID instead of void* to enable redefinition of ImTextureID (#2015, #301) --- examples/imgui_impl_dx12.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/imgui_impl_dx12.cpp b/examples/imgui_impl_dx12.cpp index af80c1de..a8b1c708 100644 --- a/examples/imgui_impl_dx12.cpp +++ b/examples/imgui_impl_dx12.cpp @@ -365,7 +365,7 @@ static void ImGui_ImplDX12_CreateFontsTexture() // Store our identifier static_assert(sizeof(ImTextureID) >= sizeof(g_hFontSrvGpuDescHandle.ptr), "Can't pack descriptor handle into TexID, 32-bit not supported yet."); - io.Fonts->TexID = (void *)g_hFontSrvGpuDescHandle.ptr; + io.Fonts->TexID = (ImTextureID)g_hFontSrvGpuDescHandle.ptr; } bool ImGui_ImplDX12_CreateDeviceObjects()