1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Merge branch 'master' into docking

# Conflicts:
#	backends/imgui_impl_vulkan.cpp
This commit is contained in:
ocornut 2025-11-26 14:33:25 +01:00
commit 772cbfd014
11 changed files with 86 additions and 45 deletions

View file

@ -1,4 +1,4 @@
// dear imgui, v1.92.5
// dear imgui, v1.92.6 WIP
// (main code and documentation)
// Help:
@ -536,6 +536,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
- 2024/11/06 (1.91.5) - commented/obsoleted out pre-1.87 IO system (equivalent to using IMGUI_DISABLE_OBSOLETE_KEYIO or IMGUI_DISABLE_OBSOLETE_FUNCTIONS before)
- io.KeyMap[] and io.KeysDown[] are removed (obsoleted February 2022).
- io.NavInputs[] and ImGuiNavInput are removed (obsoleted July 2022).
- GetKeyIndex() is removed (obsoleted March 2022). The indirection is now unnecessary.
- pre-1.87 backends are not supported:
- backends need to call io.AddKeyEvent(), io.AddMouseEvent() instead of writing to io.KeysDown[], io.MouseDown[] fields.
- backends need to call io.AddKeyAnalogEvent() for gamepad values instead of writing to io.NavInputs[] fields.
@ -21867,23 +21868,21 @@ void ImGui::UpdateDebugToolFlashStyleColor()
DebugFlashStyleColorStop();
}
static const char* FormatTextureIDForDebugDisplay(char* buf, int buf_size, ImTextureID tex_id)
ImU64 ImGui::DebugTextureIDToU64(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*))
ImFormatString(buf, buf_size, "0x%p", tex_id_opaque.ptr);
else
ImFormatString(buf, buf_size, "0x%04X", tex_id_opaque.integer);
return buf;
ImU64 v = 0;
memcpy(&v, &tex_id, ImMin(sizeof(ImU64), sizeof(ImTextureID)));
return v;
}
static const char* FormatTextureRefForDebugDisplay(char* buf, int buf_size, ImTextureRef tex_ref)
{
char* buf_p = buf;
char* buf_end = buf + buf_size;
if (tex_ref._TexData != NULL)
buf += ImFormatString(buf, buf_end - buf, "#%03d: ", tex_ref._TexData->UniqueID);
return FormatTextureIDForDebugDisplay(buf, (int)(buf_end - buf), tex_ref.GetTexID()); // Calling TexRef::GetTexID() to avoid assert of cmd->GetTexID()
buf_p += ImFormatString(buf_p, buf_end - buf_p, "#%03d: ", tex_ref._TexData->UniqueID);
ImFormatString(buf_p, buf_end - buf_p, "0x%X", ImGui::DebugTextureIDToU64(tex_ref.GetTexID()));
return buf;
}
#ifdef IMGUI_ENABLE_FREETYPE
@ -22069,9 +22068,9 @@ void ImGui::DebugNodeTexture(ImTextureData* tex, int int_id, const ImFontAtlasRe
}
PopStyleVar();
char texid_desc[30];
char texref_desc[30];
Text("Status = %s (%d), Format = %s (%d), UseColors = %d", ImTextureDataGetStatusName(tex->Status), tex->Status, ImTextureDataGetFormatName(tex->Format), tex->Format, tex->UseColors);
Text("TexID = %s, BackendUserData = %p", FormatTextureRefForDebugDisplay(texid_desc, IM_ARRAYSIZE(texid_desc), tex->GetTexRef()), tex->BackendUserData);
Text("TexRef = %s, BackendUserData = %p", FormatTextureRefForDebugDisplay(texref_desc, IM_ARRAYSIZE(texref_desc), tex->GetTexRef()), tex->BackendUserData);
TreePop();
}
PopID();