Library: @native on small, frequently called helpers (style color stack, tree push/pop, indent, item size, draw list clip/cmd, glyph lookup, table column helpers)
Picked from a per-function call census of the whole demo opened (hundreds of calls/frame each); +~100 KB of native code. Whole demo open (headless --roblox) 10.35 -> 9.84 ms/frame together with the previous commits; draw data unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
1b7a5ebc93
commit
67af9aa19e
5 files changed
+31
No files matched your search
@@ -577,6 +577,7 @@ ImGuiKeyOwner_NoOwner = 4294967295 -- Require key to have no owner.
|
||||
function ImGui.MouseButtonToKey(button) IM_ASSERT(button >= 0 and button < ImGuiMouseButton.COUNT) return ImGuiKey.MouseLeft + button end
|
||||
|
||||
--- @param key ImGuiKey
|
||||
@native
|
||||
function ImGui.IsNamedKey(key)
|
||||
return key >= ImGuiKey.NamedKey_BEGIN and key < ImGuiKey.NamedKey_END
|
||||
end
|
||||
@@ -1449,6 +1450,7 @@ MT.ImGuiNextItemData = {}
|
||||
MT.ImGuiNextItemData.__index = MT.ImGuiNextItemData
|
||||
|
||||
-- Also cleared manually by ItemAdd()!
|
||||
@native
|
||||
function MT.ImGuiNextItemData:ClearFlags()
|
||||
self.HasFlags = ImGuiNextItemDataFlags.None
|
||||
self.ItemFlagsSet = ImGuiItemFlags.None
|
||||
@@ -1498,6 +1500,7 @@ end
|
||||
MT.ImGuiNextWindowData = {}
|
||||
MT.ImGuiNextWindowData.__index = MT.ImGuiNextWindowData
|
||||
|
||||
@native
|
||||
function MT.ImGuiNextWindowData:ClearFlags()
|
||||
self.HasFlags = ImGuiNextWindowDataFlags.None
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user