You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repo contains C# bindings for Dear ImGui as well as a Biohazrd-powered generator for generating them.
We currently publish NuGet packages for .NET 6 on Windows x64 and Linux x64 (glibc >= 2.27). The Mochi.DearImGui package currently only provides Windows support, it will be a cross-platform meta package in the future. Mochi.DearImGui.linux-x64 provides support for Linux.
A backend for OpenTK is published as Mochi.DearImGui.OpenTK, and is platform-independent. See Mochi.DearImGui.Sample for example usage.
In contrast to other C# bindings for Dear ImGui, this one interacts with the C++ API directly and is lower-level. If you need high-level bindings consider using the excellent ImGui.NET instead.
Visual Studio must have the "Desktop development with C++" workload installed.
Linux Prerequisites
Ubuntu 20.04 Focal x64 is recommended, but most distros are expected to work. (Mochi.DearImGui itself should also work on Linux ARM64, but the OpenTK backend doesn't since OpenTK's GLFW redistributable doesn't.)
Package
Tested Version
build-essential
12.8
cmake
3.16.3
dotnet-sdk-6.0
6.0.100
Building Dear ImGui and generating the bindings
Ensure Git submodules are up-to-date with git submodule update --init --recursive
Build and run generate.cmd (Windows) or generate.sh (Linux) from the repository root
Building and running the sample
Without modification the sample will depend on the bindings being built locally as instructed above.
Simply build+run Mochi.DearImGui.Sample as you would any other .NET project. (IE: Using F5 in Visual Studio or dotnet run --project Mochi.DearImGui.Sample.)
About
Automatically generated low-level C# bindings for Dear ImGui