mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 11:57:00 +00:00
This commit is contained in:
parent
a201af7354
commit
81e0be856a
@ -14787,10 +14787,12 @@ void ImGui::DebugNodeColumns(ImGuiOldColumns* columns)
|
|||||||
|
|
||||||
static void FormatTextureIDForDebugDisplay(char* buf, int buf_size, ImTextureID tex_id)
|
static void FormatTextureIDForDebugDisplay(char* buf, int buf_size, ImTextureID tex_id)
|
||||||
{
|
{
|
||||||
|
union { void* ptr; int integer; } tex_id_opaque;
|
||||||
|
memcpy(&tex_id_opaque, &tex_id, ImMin(sizeof(void*), sizeof(tex_id)));
|
||||||
if (sizeof(tex_id) >= sizeof(void*))
|
if (sizeof(tex_id) >= sizeof(void*))
|
||||||
ImFormatString(buf, buf_size, "0x%p", (void*)*(intptr_t*)(void*)&tex_id);
|
ImFormatString(buf, buf_size, "0x%p", tex_id_opaque.ptr);
|
||||||
else
|
else
|
||||||
ImFormatString(buf, buf_size, "0x%04X", *(int*)(void*)&tex_id);
|
ImFormatString(buf, buf_size, "0x%04X", tex_id_opaque.integer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// [DEBUG] Display contents of ImDrawList
|
// [DEBUG] Display contents of ImDrawList
|
||||||
|
Loading…
Reference in New Issue
Block a user