English | 简体中文
A complete Dear ImGui application built directly on the raw ImGui4NET bindings:
OpenTK supplies the window and the OpenGL 4.1 context, and every pixel of the UI
is drawn through ImDrawList.
- Bare-metal bindings —
ImGui.CreateContext,ImGuiIO,ImGui.NewFrameandImGui_ImplOpenGL3.*are called exactly as the C++ API defines them. There is no wrapper layer. - Custom-drawn chrome — the top bar, left rail, stat cards, sparklines,
progress rings and the two-series chart are all
ImDrawListprimitives, so the layout does not depend on the stock widget metrics. - Microsoft YaHei —
ShowcaseUi.LoadFontsloadsmsyh.ttcfrom the Windows font directory with the Simplified Chinese glyph range, falling back to other CJK fonts and finally to the embedded default. All text sizes are baked from that single font through the dynamic atlas added in Dear ImGui 1.92. - imgui_club — the Memory tab embeds
MemoryEditorfromImGui4NET.Club. - Screenshot capture —
Screenshot.Capturereads the back buffer withglReadPixelsand writes a PNG, which is how the images below were produced.
- .NET 10 SDK
- A GPU/driver with OpenGL 4.1
- Windows for the Microsoft YaHei font path; other platforms fall back automatically
dotnet run --project samples/ImGui4NET.Sample.OpenGL3Press Esc to quit and F12 to save a screenshot next to the working
directory.
Four stat cards with animated sparklines and progress rings, a live two-series throughput chart, and a table of recent CI builds.
Custom toggle switches, sliders, a profile combo, circular gauges, an accent colour picker with a clickable palette, and a tree view. Each card is a child window so the stock widgets flow normally inside it.
The imgui_club Memory Editor, driven through its pure C# port
(MemoryEditor.DrawContents).
| File | Purpose |
|---|---|
Program.cs |
OpenTK host: context creation, per-frame input feed, render loop |
ShowcaseUi.cs |
The whole dashboard: theme, fonts, layout, custom widgets |
Screenshot.cs |
glReadPixels back-buffer capture to PNG |


