A RenderDoc-style debugger for MobileGL retrace files. It opens apitrace-v6 .trace
files (raw, snappy/zlib/zstd/brotli containers) and MobileGL .tgz fixtures (a gzipped
tar whose trace.trace member may itself be container-compressed, e.g. brotli), replays the recorded GLES/EGL call
stream on a switchable backend, and lets you inspect every call and the full GL state at
any event — like stepping through a frame in RenderDoc.
Backends:
- Native OpenGL — the host desktop GL driver (ES-profile context when available, desktop compat GL with ES-alias fixes otherwise).
- MobileGL Espryt (
DirectGLES) — MobileGL statically linked, running on ANGLE. - MobileGL Magma (
DirectVulkan) — MobileGL statically linked, running on Vulkan.
Panels:
- API Inspector — two-column view: recorded GL call (with formatted args) on the left, the MobileGL backend-function-table calls it produced on the right.
- Texture Viewer — texture list with zoomable pixel readback.
- Pipeline State — render state (blend, depth, stencil, ...) at the current event.
- Frame Debugger — draw-call grouping and default-framebuffer preview per frame.
- MobileGL Backend State — internal MobileGL state with the source event id (EID) each value was captured at.
Requirements: Windows, Visual Studio 2022 (MSVC), CMake ≥ 3.24, Ninja, Git (third-party deps are fetched with CMake FetchContent).
:: from a "x64 Native Tools" prompt, or after running vcvars64.bat
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release [-DMOBILEGL_ROOT=...] [-DMGDB_WITH_MOBILEGL=ON/OFF]
cmake --build buildOutputs land in build/bin/ (mgdb_ui.exe, mgdb_retrace.dll, test binaries).
Options:
MOBILEGL_ROOT— path to the MobileGL repository (defaultC:/Users/geekerwan/AndroidStudioProjects/FoldCraftLauncher/MobileGL). Needed for the Khronos headers and, withMGDB_WITH_MOBILEGL=ON, for the Espryt/Magma backends.MGDB_WITH_MOBILEGL(default ON) — set OFF to build without the MobileGL backends (native OpenGL only).MGDB_BUILD_TESTS(default ON) — gtest suites, run viactest --test-dir build.
mgdb_ui.exe [path-to-trace]
The optional argument auto-opens a .trace or .tgz at startup; otherwise use
File → Open Trace… (Ctrl+O). Use the backend
menu to switch between Native OpenGL / Espryt / Magma at any time.
Runtime requirements:
- Espryt needs ANGLE's
libEGL.dll/libGLESv2.dllon the DLL search path. - Magma needs a working Vulkan driver.
- Switching backends (or seeking backwards) tears the backend down and replays the trace from call 0 up to the current event — on large traces this takes noticeable time.
mgdb_ui.exe: SDL3 + ImGui (docking) shell; talks to the engine only through the C ABI ininclude/mgdb/mgdb_api.h— never calls rawgl*symbols itself.mgdb_retrace.dll: trace parser + replay engine + GL state tracker + backends, statically linked with MobileGL.mgdb_trace: apitrace v6 parser, trace model, container decompression (snappy, zlib, zstd, brotli, tar.gz fixtures).mgdb_dispatch: generated invoker that marshals recorded calls onto real GL entry points, plus EGL adaptation onto the host platform.mgdb_pal/mgdb_backend: SDL3-based windowing/context abstraction, and the Native / Espryt / MagmaIBackendimplementations.- See ARCHITECTURE.md for the full contracts, EGL adaptation rules, and state-JSON schema.