4DBug
a474a4dfe2
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.
2026-10-20 15:19:28 -05:00
4DBug
2d902020ff
tools/test: t_stress.luau, headless copy of the Studio bench scene (library CPU per frame + draw checksum)
2026-10-20 15:19:28 -05:00
4DBug
28ab541ce9
Library: drop @native from once-per-window/frame giants, fewer slow lookups in text helpers
...
- Begin/End/NewFrame/UpdateMouseInputs back to interpreted: ~520 KB of native code (Begin alone 369 KB, +30% of the
bundle's native code) for ~5 us/frame; native code is a game-wide budget in Roblox
- GetCurrentWindow(): read g.CurrentWindow once (the key sits in a hash slot >= 256 of the ~300-field context, which
Luau's inline cache can't predict, so every read is a slow lookup)
- FindRenderedTextEnd(): strings use string.find/string.len directly (no ImMemchr() call, no `#` on a string)
- CalcTextSize(): calls CalcTextSizeXY() directly (one wrapper level less); TextEx(): string.len() for strings
Draw data unchanged.
2026-10-20 15:19:28 -05:00
4DBug
28c126c01d
Library: fewer calls/lookups per text item, table cell and frame
...
- Text(): TextV() inlined (one vararg call less per formatted Text); TextEx(): CalcTextSize() inlined
- ImFontCalcTextSizeXY / RenderText / CalcWordWrapPosition: GetFontBaked() fast path inlined (LastBaked check)
- TableBeginCell(): SetWindowClipRectBeforeSetChannel() inlined; SetCurrentChannel(): skip the TexRef field reads
when both commands share the same TexRef (as ImDrawCmd_HeaderCompare already does)
- UpdateKeyboardInputs / UpdateKeyRoutingTable: loop-invariant field reads hoisted
- `#` on strings replaced by string.len() in ImFontCalcTextSizeXY (`#` is not a native fast path)
Headless --roblox: stress+demo 0.98 -> 0.89 ms/frame, empty frame 0.085 -> 0.067 ms; draw data unchanged.
2026-10-20 15:19:28 -05:00
4DBug
7d52899adb
Library: @native on hot interpreted paths (Begin/End, NewFrame key loops, table rows, sliders, buttons, wrapped text, GetFontBaked)
...
Fewer native<->interpreter transitions on the per-item call chains. Stress+demo headless (--roblox) 0.98 -> 0.93 ms/frame,
draw data unchanged.
2026-10-20 15:19:28 -05:00
4DBug
052708f957
Roblox backend: tiles no longer allocate a 64 KB CPU pixel buffer each (unused since dirty rects are rasterized straight into upload buffers)
2026-10-20 15:12:11 -05:00
4DBug
4be4a8eb5c
Roblox backend raster: damage to the uniform rows collected in one pending rect (applied when a span needs them); spans process runs of rows with the same uniform piece at once
2026-10-20 15:11:51 -05:00
4DBug
7b55a45be1
Roblox backend raster: uniform rows are only valid inside the last ClearRect (no reset passes)
2026-10-20 15:11:51 -05:00
4DBug
2c34c9a8e7
Roblox backend raster: glyph blits read consecutive texels without the column table, cache white-texel blends per alpha
2026-10-20 15:11:51 -05:00
4DBug
1765c7c098
Roblox backend raster: uniform region tracked per row instead of one rect (translucent spans over uniform rows fill instead of blending per pixel)
2026-10-20 15:11:51 -05:00
4DBug
25e2c1588d
Roblox backend: rasterize dirty rects straight into the upload buffer (no CopySubRect, no cold 64 KB tile buffer)
2026-10-20 15:11:51 -05:00
4DBug
718a143a5c
Font atlas: ImTextureData:Create() reuses the pixel table of the last atlas texture removed after the backend destroyed it (same byte size, zero-filled with table.move doubling) instead of a new 512K-entry table per repack (texadd 92 -> 44 ms, bake bench -8% run side by side; atlas/glyph checksums and draw hashes unchanged)
2026-10-20 14:47:54 -05:00
4DBug
c57877ad37
Parallel: Actors free destroyed textures (each atlas grow/repack left a full copy in every Actor), atlas patches send the updated glyph rects instead of whole row spans and are built once per version for all Actors (fonts tex sends 151 -> 91 KB/frame in Studio, TexBytes 35.6 -> 22.2 MB headless); Actor texture handling moved to Raster.ApplyTextures, which Sync mode now runs on per-Actor copies so t_parallel checks it; t_parallel fonts scenario (new size per frame), check_all runs 620 frames
2026-10-20 14:47:54 -05:00
4DBug
94245741af
Faster glyph baking: atlas repack finds RectsIndex entries by the loop index (index_from_ptr was O(n^2) per repack), stb_truetype vertical edges (all of ProggyClean's) without stbtt__handle_clipped_edge calls, FlattenCurves with locals + inlined add_point, @native trunc (sorted-edges 215 -> 107 ms, repack 330 -> 184 ms on bake bench; glyph bitmaps, atlas and draw hashes unchanged)
2026-10-20 14:47:54 -05:00
4DBug
dbe961317e
Textures: typed, unrolled RGBA/Alpha8 row conversion (no zero-skip branch): new 512x256 atlas record 0.54 -> 0.30 ms headless, pixels unchanged
2026-10-20 14:47:54 -05:00
4DBug
1ec760f639
Roblox render: hot loop locals, native DrawLayer, DirtyRects without copies
...
- CollectPrims / HashTiles / DirtyRects: the Prim* / slot tables as locals (upvalue access per element was
measurable: Collect -13%, Hash -8%)
- CollectPrims notes flat rects (PrimFlat): HashTiles no longer re-reads uvs, gradient and texture per quad
- HashTiles: one loop over a primitive's tiles instead of nested for loops (most touch one tile)
- DrawLayer, SweepTiles @native (per-tile bookkeeping -33%)
- DirtyRects: clipped bounds computed once (content bounds from them); the tile's Drawn* hash/flat lists are
swapped with the layer's lists and the bounds with a scratch set instead of copied per entry
Headless full re-collect of the demo vs 0.4.2: Collect -24%, Hash -48%, bookkeeping -32%. Pixels identical
(t_pixels, t_composite, t_parallel, TileLimit run).
2026-10-20 14:47:19 -05:00
4DBug
b60ba649f2
Roblox render: cheaper CollectPrims + HashTiles (per changed draw list)
...
HashTiles: a touched tile's count/hashes/lists live in slot arrays for the call (one KeySlot lookup per tile
switch instead of ~7 hash-table reads/writes; consecutive primitives alternate tiles ~40% of the time), the
vertex hash is inlined (HashVertex calls weren't inlined and cost more than the hashing), tile ranges come
from the already-relative bounds. Hash values are unchanged.
CollectPrims: the axis aligned rect test runs before the textured line-quad test (mutually exclusive, so the
result is the same; glyphs no longer read their colours/uvs twice), clipped/limit/extent checks per command
from the command's bounds instead of per primitive, and primitives go to their layer lists while collecting
(no PrimKind pass in DrawLists).
Headless full re-collect of the demo (1500 prims): Collect -10%, Hash -35%.
2026-10-20 14:47:19 -05:00
4DBug
8b7c6d6ff0
Roblox backend: faster unchanged check: CompareDrawList compares vertices as 4 f64 + col (3x fewer reads), indices 4 per step; a moved list's snapshot is shifted in place (ShiftSnapshot) instead of re-snapshotted from another list's Cmd* data
2026-10-20 13:56:21 -05:00
4DBug
0f81d4bb18
0.4.2
...
Build & Release / build (push) Canceled after 0s
- Less garbage per frame: scalar text/label sizes, scratch rects/points, reused clip-stack ImVec4 and window stack entries (160 -> 56 KB/frame on demo+stress, draw hashes unchanged)
- Faster glyph baking: @native rasterizer/rect packer/pixel loops, glyph shape cache, comparator-free edge sort, inline scanline conversion, table.create zero-fill; fix leaked global 'step'
- Textures: new atlases convert only the packed corner, flat row conversion skipping zero pixels
- Raster: uniform-region tracking, direct opaque glyph texels, inlined BlendPixel with per-texel cache
- Raster: textured line quads drawn as one quad, u32 texel reads for constant-colour triangles, column walk for tall narrow triangles (plot bench Raster 4.16 -> 3.21 ms, HashVertex 0.64 -> 0.55 ms, pixels unchanged)
- Parallel: send Actors only changed atlas rows / rows above FillRow (full-copy 1283 -> 619 MB on fontbench x4 Actors); dispatch small and text-heavy frames (MinTiles 1, MinPixels 2048, MaxBytesPerPixel 0)
- Stage timing: Textures and Flush stages; parallel stats explain serial flushes
- extensions/: submodules for imcurveedit-luau, imgradient-luau, imgui-memory-editor-luau, imsequencer-luau; all 9 submodule URLs and README links now on GitHub
- new examples: example_love_extensions, example_roblox_extensions
2026-10-17 13:18:53 -05:00
4DBug
e2d1cf5cf9
0.4.1
...
Build & Release / build (push) Canceled after 0s
- TextProxy works for any widget that sets PlatformImeData.WantTextInput (+ SelectedText)
- TextProxy: key-code fallback waits for the TextBox (fixes doubled typing); no stuck Ctrl after paste
- Raster: reversed rects (min > max) draw like upstream (fixes ImNodes/ImPlot box select)
- test harness: --module NAME=path loads extra ModuleScripts
- new tests: t_textproxy_custom, t_rect_flip
- extensions/: submodules for imguicolortextedit-luau, imguizmo-luau, implot-luau, implot3d-luau, imnodes-luau
2026-10-17 07:31:40 -05:00
4DBug
c5a0b20132
0.4.0
Build & Release / build (push) Canceled after 0s
2026-10-16 22:53:18 -05:00
4DBug
6415fb2a0b
0.3.0
Build & Release / build (push) Canceled after 0s
2026-10-15 11:04:45 -05:00
4DBug
f3b353fdfe
CI/releases: drop the nodemo bundles (--no-demo build flag kept); remove examples/example_shared; Roblox backend RenderRate defaults to 60 (0 = every frame); README + TODO.txt updated
2026-10-15 10:57:00 -05:00
4DBug
efb7db544c
Fix: long TextUnformatted (>2000 bytes) rendered each visible line to the end of the text (RenderText end was nil, upstream passes line_end); PushFont() saved the new font instead of the current one, so PopFont() never restored it (font preview leaked into all later text); t_fixes covers both
2026-10-15 10:54:56 -05:00
4DBug
a43b488225
Port leftovers: BringWindowToDisplayBehind, ImGuiSizeCallbackData + CalcWindowSizeAfterConstraint, ErrorCheckUsingSetCursorPosToExtendParentBoundaries, PopFocusScope user error (+ SetCurrentWindow stack sizes fix), log text decorations (Button/Menu/TreeNode/Drag/Slider/InputText/Checkbox/Radio), DataTypeFormatString display, ImGuiDataType S64/U64 (upstream enum layout; doubles), sscanf %u/length modifiers, mouse arrays sized ImGuiMouseButton.COUNT, AddCallback userdata copy; TODO.txt refreshed
2026-10-15 10:51:20 -05:00
4DBug
012bde5b64
Integration: debug/context fields in ImGuiContext ctor, ImGuiContextHookType, DebugFlashStyleColorIdx=COUNT, CurrentPixelDensity, clipper range/data helpers, full Shutdown cleanup, settings dates (ImGuiSettingsCleanupArgs, CleanupIniSettings, LastUsed=, Platform_SessionDate) + metrics Settings section, ImGuiStyleVar SeparatorSize/DockingSeparatorSize (fixes off-by-one style var table), LogRenderedText restored in RenderText*, combo preview 1.93, InputScalar ValidatedThisFrame, ImGuiListClipperFlags/LogFlags/OldColumnFlags, ImGuiKey digit aliases, backend names
2026-10-15 09:39:17 -05:00
4DBug
5ccf4a0e70
compare_upstream: skip IM_MSVC_RUNTIME_CHECKS_*/template<> when naming structs; [=] status for intentional Lua replacements (ImGuiStorage, ImStr*/ImFormatString*, allocators, C++ container internals, sizeof/ABI helpers...) with evidence regexes, reported separately
2026-10-15 09:39:17 -05:00
4DBug
d122b3ad38
Port debug tools (item picker, flash style color, debug locate, DebugDraw*, keyboard preview, debug break, DrawCmd mesh view), context hooks, SetContextName, AddInputCharactersUTF8, sanity checks, window resize ids, Register/UnregisterUserTexture, SetPixelDensity, TestShortcutRouting, DemoMarker; InputTextState selection API (fixes undo crash, callbacks get 0-based positions), ShortcutsForCancel (Esc/right-click reverts drags/sliders), ImParseFormatSanitizeForPrinting, ImDrawList CloneOutput/PrimQuadUV/AddImageQuad, ImDrawData DeIndexAllBuffers/ScaleClipRects, internal helpers (ImBitVector, ImGuiPackedDate, inline ImGui getters...); t_debugtools, t_helpers
2026-10-15 08:52:30 -05:00
4DBug
a94c508f38
Fonts: ImFontGlyphRangesBuilder + GetGlyphRangesDefault, ImFont:CalcWordWrapPosition, stb_decompress + Decode85 + AddFontFromMemoryCompressed(Base85)TTF, atlas helpers (RemoveFont, RemoveCustomRect, AddRemapCodepoint (remap never triggered before), IsGlyphRangeUnused, texture status/format names...); t_fonts
2026-10-15 08:05:51 -05:00
4DBug
c050c24cee
Port ImTriangulator + upstream AddConcavePolyFilled (AA fringe, no per-triangle seams); [Luau] handles CCW winding and duplicate/collinear points that upstream mis-triangulates
2026-10-15 07:43:21 -05:00
4DBug
f66536bb4b
Library draw call sites match 1.93: AddLineH/AddLineV + StrokeCenterBiased/StrokeInside (window/menu borders, separators, text cursor), tab border PathStroke, check mark AALineEnds, CloseButton/TreeNode lines/ColorButton/alpha checkerboard 1.93, Ctrl+Tab highlight AddRect arg order, metrics AA push/pop
2026-10-15 07:24:13 -05:00
4DBug
a5906a264e
Draw list 1.93: baked round corners in the font atlas (ImFontAtlasBuildUpdateTexDataCorners, fill radii 1..16 + 3 stroke thicknesses) used by AddRect/AddRectFilled when pixel-aligned (_AddRectBaked/_AddRectFilledBaked)
2026-10-15 06:55:57 -05:00
4DBug
7aa896ca5c
Draw list 1.93 strokes: _AddPolyline ported (texture AA lines, joins/miter/bevel, CapSquare, AALineEnds, Stroke Inside/Center/CenterBiased/Outside/Legacy), AddConvexPolyFilled AAFill, all primitives with 1.93 signatures/flags, PathRect/PathArcTo 1.93, baked line textures; Custom Rendering demo flags UI restored. check_all: t_pixels incremental==full redraw, headless screenshot (tools/test/shot.py)
2026-10-15 06:37:49 -05:00
4DBug
6eafbcb794
Draw list 1.93 foundation (no output change): ImDrawFlags 1.93 values (Round*/Stroke*/AA*/JoinMiter/CapSquare/TextNoPixelSnap/UseTexForRoundCorners...; RoundCorners* kept as obsolete aliases), ImDrawList.Flags + PushDrawFlag/PopDrawFlag/_SetPixelDensity, SetupDrawListSharedData 1.93, style.CurveTessellationMaxError/AntiAliasedLineEnds, _AddPolyline entry point
2026-10-15 05:13:58 -05:00
4DBug
53c9004432
compare_upstream: match XxxMT:Method and Class_Method globals to C++ class members (demo 100% ported by name)
2026-10-15 04:35:23 -05:00
4DBug
dae9d4be44
Demo: Selection State & Multi-Select section (ExampleSelectionWithDeletion, ExampleDualListBox, all 11 sub-demos) and Assets Browser ported; fix ImFloor() for negative non-integers (was floor-1)
2026-10-15 04:13:40 -05:00
4DBug
595881b8d8
Port multi-select, box-select and typing-select (BeginMultiSelect/EndMultiSelect, SetNextItemSelectionUserData, MultiSelectItemHeader/Footer, BeginBoxSelect/EndBoxSelect, GetTypingSelectRequest/TypingSelectFind*, ImGuiSelectionBasicStorage/ExternalStorage, Metrics nodes); wired into Selectable/Checkbox/TreeNode/clipper/tables; t_multiselect
2026-10-15 03:49:53 -05:00
4DBug
bc1c948371
Fix: InputTextMultiline crashed when drawn (InputTextLineIndexBuild/line offsets 0-based like upstream, inverted buf_display_end), InputText LiveEdit flag check; Shortcut()/IsKeyChordPressed() upstream defaults; FrameCount starts at 0 (IsWindowAppearing on first frame); missing ImGuiIO config fields with upstream defaults (+ ConfigDebugBeginReturnValueOnce/Loop); ColorButton drag source + ColorEdit4 drop target, IMGUI_PAYLOAD_TYPE_COLOR_3F/4F; t_fixes covers them
2026-10-15 03:03:10 -05:00
4DBug
0cb8670d04
Demo: re-ported imgui_demo.cpp line by line in upstream order (one function per upstream function, same labels/HelpMarkers/comments, 176/186 IMGUI_DEMO_MARKERs; port table driver/Sub()/Demo* helpers removed, statics in S.<Function>). New: DemoWindowInputs (Inputs & Focus), Image Viewer, ShowExampleAppDockSpaceBasic. Selection/Assets Browser stubbed until multi-select is ported. ImColor helper (imgui_h.lua). PORT_STATUS demo similarity 29% -> 51%
2026-10-15 02:32:58 -05:00
4DBug
1f1c744034
Fix: ImDrawList:PushClipRectFullScreen() was missing (drop target outside the window clip rect crashed); CalcItemSize() no longer writes to the caller's size (by value like upstream; fixes BeginTable UserOuterSize), scalar _CalcItemSizeXY for internal callers; t_fixes covers both
2026-10-15 02:05:43 -05:00
4DBug
73538df44a
tools/test: check_all.sh (CI mirror + all scripted tests + demo forced open + LÖVE), hashes.sh (draw checksums vs a git rev), t_libhash (library-only draw checksum); regenerate PORT_STATUS
2026-10-15 02:03:40 -05:00
4DBug
c4f8e62fa6
0.2.0
Build & Release / build (push) Canceled after 0s
2026-10-15 01:06:11 -05:00
4DBug
567114bdad
Roblox backend: redraw budget is opt-in (SetRedrawBudget default 0 = every changed tile drawn the same frame)
2026-10-15 00:55:43 -05:00
4DBug
dc11b8a2d1
bundle.py: build-time Luau optimizations (draw-data identical; IMGUI_BUNDLE_NOOPT=1 disables): hot library globals as bundle locals, enum/constant folding (values dumped by the luau CLI; IMGUI_BUNDLE_STRICT=1 in CI), --@hoist pure helpers to inlinable bundle-level local functions, statement IM_ASSERT -> assert; builtin type instead of ImGui._GetTypeFunc() alias (GETGLOBAL 15903 -> 540)
2026-10-15 00:23:20 -05:00
4DBug
d007c72a89
Library perf (draw-data identical): layout core (no ImVec2 __index in ItemSize, inlined ID/style/clip stacks, scalar ItemAdd/IsClippedEx/CalcItemSize/GetColorU32), text + widgets (scalar TextEx/ButtonEx/Checkbox/Slider/Drag/Selectable/TreeNode, word-wrap memo), tables (in-place clip rects, no per-row/cell temporaries, @native cell functions, scalar ClipWith), draw list (PrimRectXY, scalar AddRect/AddRectFilled/AddLine/PathRect/arcs)
2026-10-14 23:27:23 -05:00
4DBug
60faae442f
Roblox backend perf (pixel-identical): redraw budget (SetRedrawBudget, default 1.5 ms; RenderRate default 0), exact in-place draw list compare + whole-pixel move fast path, partial tile redraws, flat rects hashed by in-tile rect, quads hashed by TL/BR, no full redraw on texture updates, @native CopyTexturePixels, reused partial upload buffers; imgui_draw: @native word wrap, ImStrByte/classifier inlined, text size cache covers wrapped text; t_pixels pixel oracle; run.py RUN_FLAGS
2026-10-14 22:26:38 -05:00
4DBug
df35c4ff47
tools/compare_upstream.py: port coverage + code similarity vs upstream, writes docs/PORT_STATUS.txt
2026-10-14 22:26:38 -05:00
4DBug
b3840a2841
0.1.4
Build & Release / build (push) Canceled after 0s
2026-10-14 10:32:10 -05:00
4DBug
abf54a8cee
InputText: fix clipboard paste (filter was inverted, then off-by-one in the filtered buffer); ImParseFormatTrimDecorations: return [start, end) like upstream (Ctrl+click temp input showed decorations / crashed on "%d%%"); ShrinkWidths: tie order by Index descending like upstream; t_fixes test
2026-10-14 10:32:10 -05:00
4DBug
be7d066479
Comments: mirror upstream imgui.cpp/.h, imgui_internal.h, widgets/draw/tables/demo and imstb_* comments (comment-only, code tokens unchanged)
2026-10-14 10:23:55 -05:00