Skip to content

feat(menu): native ImGui mod menu and present-frame effects - #38

Merged
Lynxifyy merged 2 commits into
mainfrom
feat/native-imgui-menu-and-present-frame-effects
Nov 14, 2026
Merged

Lynxifyy merged 2 commits into
mainfrom
feat/native-imgui-menu-and-present-frame-effects

Conversation

@Lynxifyy

Copy link
Copy Markdown
Collaborator

What changed

Adds the in-game Mod Menu (Dear ImGui on the game's own GL context) and the two present-frame
effects, and vendors Dear ImGui so the build never needs the network.

pl/menu/ — the native ImGui menu

MenuTheme.* and MenuWidgets.* are the Caramel UI pack's imgui/src/CaramelTheme.* and
CaramelWidgets.* ported token for token, so the launcher and the in-game menu share one design
language. MenuHost lazily creates the ImGui context on the first present where the seam is live and
pumps the frame from the present hook; MenuRender draws the header, tab bar and pages; MenuJni
is the Java bridge (org.chimeramc.client.preloader.PreloaderMenu); MenuFilter and MenuTypes.hpp
hold the filter rule and data types and stay ImGui-free so the host tests can exercise them.

The GLFW desktop backend the pack ships is not wired: Android has no windowing stack, so the menu
draws through the game's GL context (imgui_impl_opengl3 only).

pl/render/ — present-frame effects

PresentFrameEffect hooks the present / frame-boundary seam (eglSwapBuffers detour) and blends
the previous presented frame into the new one. PresentFrameMath.hpp is the pure, host-testable
blend + budget clamp. Two effects ride it:

  • frame generation — blends so motion reads smoother at the same render rate; no extra frame is
    presented.
  • motion blur — blends by view speed, with the budget clamped.

Both are badged while the present hook is absent, and neither claims a frame-rate gain.

Vendored Dear ImGui

third_party/imgui/ (1.91.5 + the imgui_impl_opengl3 backend) is vendored rather than fetched,
because the build must not depend on the network at configure time. NOTICE attributes it and
scripts/check_pinned_deps.py still passes.

Verification

  • tests/cosmetics/run_tests.sh — all host tests pass, including the new PresentFrameMathTest
    and MenuFilterTest.
  • scripts/check_sources_listed.py, scripts/check_pinned_deps.py — pass.

…pack theme

The in-game Mod Menu is drawn by Dear ImGui on the game's own GL context
through the present hook. CaramelTheme/CaramelWidgets from the Caramel UI
pack are ported into pl/menu as MenuTheme/MenuWidgets, so the launcher and
the in-game menu share one design language.

Adds the two present-frame effects (frame generation, motion blur) on the
eglSwapBuffers detour: both blend the previous presented frame into the new
one, neither presents an extra frame, and the blur budget is clamped.
@Lynxifyy
Lynxifyy merged commit fac14a2 into main Nov 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant