• Stars
    star
    1,428
  • Rank 31,644 (Top 0.7 %)
  • Language
    C#
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An ImGui wrapper for .NET.

ImGui.NET

This is a .NET wrapper for the immediate mode GUI library, Dear ImGui (https://github.com/ocornut/imgui). ImGui.NET lets you build graphical interfaces using a simple immediate-mode style. ImGui.NET is a .NET Standard library, and can be used on all major .NET runtimes and operating systems.

Included is a basic sample program that shows how to use the library, and renders the UI using Veldrid, a portable graphics library for .NET. By itself, Dear ImGui does not care what technology you use for rendering; it simply outputs textured triangles. Example renderers also exist for MonoGame and OpenTK (OpenGL).

This wrapper is built on top of cimgui, which exposes a plain C API for Dear ImGui. If you are using Windows, OSX, or a mainline Linux distribution, then the ImGui.NET NuGet package comes bundled with a pre-built native library. If you are using another operating system, then you may need to build the native library yourself; see the cimgui repo for build instructions.

NuGet

As of February 2023, I (@mellinoe) am no longer able to publicly share updates to ImGui.NET and related libraries. A big thanks to @zaafar who continues to actively maintain the library and keep it up to date with new versions of native Dear ImGui. Feel free to join the Discord server for more information about the current status of development.

Building

ImGui.NET can be built in Visual Studio or on the command line. The .NET Core SDK is needed to build on the command line, and it can be downloaded here. Visual Studio 2017 is the minimum VS version supported for building.

Usage

ImGui.NET currently provides a raw wrapper around the ImGui native API, and also provides a very thin safe, managed API for convenience. It is currently very much like using the native library, which is very simple, flexible, and robust. The easiest way to figure out how to use the library is to read the documentation of imgui itself, mostly in the imgui.cpp, and imgui.h files, as well as the exported functions in cimgui.h. Looking at the sample program code will also give some indication about basic usage.

Debugging native code

ImGui.NET is a wrapper over native code. By default, this native code is packaged and released in an optimized form, making debugging difficult. To obtain a debuggable version of the native code, follow these steps:

  1. Clone the ImGui.NET-nativebuild repo, at the tag matching the version of ImGui.NET you are using.
  2. In the ImGui.NET-nativebuild repo, run build.cmd debug or build.sh debug (depending on your platform).
  3. Copy the produced binaries (cimgui.dll, libcimgui.so, or libcimgui.dylib) into your application.
  4. Run the program under a native debugger, or enable mixed-mode debugging in Visual Studio.

See Also

https://github.com/ocornut/imgui

Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline enabled application. It is fast, portable, renderer agnostic and self-contained (no external dependencies).

Dear ImGui is designed to enable fast iterations and to empower programmers to create content creation tools and visualization / debug tools (as opposed to UI for the average end-user). It favors simplicity and productivity toward this goal, and lacks certain features normally found in more high-level libraries.

Dear ImGui is particularly suited to integration in games engine (for tooling), real-time 3D applications, fullscreen applications, embedded applications, or any applications on consoles platforms where operating system features are non-standard.

See the official screenshot thread for examples of many different kinds of interfaces created with Dear ImGui.

https://github.com/cimgui/cimgui

This is a thin c-api wrapper for the excellent C++ intermediate gui imgui. This library is intended as a intermediate layer to be able to use imgui from other languages that can interface with C .

More Repositories

1

veldrid

A low-level, portable graphics library for .NET.
C#
2,136
star
2

ShaderGen

Proof-of-concept library for generating HLSL, GLSL, and Metal shader code from C#,
C#
480
star
3

CrazyCore

Repository containing the game assets and code for Crazy Core
C#
377
star
4

ge

A general-purpose 3D game engine with editor, built with .NET Core
C#
311
star
5

veldrid-raytracer

A C# ray tracer, capable of running on both the CPU and GPU.
C#
198
star
6

vk

Low-level Vulkan bindings for .NET.
C#
171
star
7

veldrid-samples

Sample projects for Veldrid
C#
116
star
8

nativelibraryloader

A .NET Standard library for loading native shared libraries and retrieving function pointers.
C#
85
star
9

veldrid-spirv

SPIR-V shader translation for Veldrid, using SPIRV-Cross
C#
43
star
10

ImGui.NET-nativebuild

Windows/macOS/Linux/iOS/Android build automation for cimgui. Used to package up ImGui.NET.
Batchfile
22
star
11

synthapp

Experimental audio sequencer with .NET Core
C#
13
star
12

coreui

A libui wrapper for .NET Core
C#
12
star
13

assemblybrowser

A GUI-based CIL browser running on .NET Core
C#
12
star
14

Veldrid.TextRendering

Text rendering with Veldrid and SharpFont
C#
9
star
15

ecs

Trying out an experimental ECS with real ECS principles
C#
8
star
16

veldrid-docs

Documentation site for Veldrid
7
star
17

Vx

Experimenting with an easy-to-use immediate mode 3D renderer
C#
7
star
18

Snake

Snake
C#
7
star
19

corebuild

A minimal configuration for creating a .NET Core console application using a regular MSBuild csproj
7
star
20

bootstrap

Helper script for bootstrapping .NET Core on new platforms
Shell
5
star
21

Veldrid.TinyDemo

A minimal demo project using Veldrid
C#
5
star
22

ApiTools

Repo for some of the tools used in the corefx build, like GenFacades and ApiCompat
C#
3
star
23

Veldrid.Collections

A set of experimental, low-level collections.
C#
3
star
24

coretemplate

A simple template for building .NET Core libraries and applications using MSBuild
C#
3
star
25

mos6502

MOS Technology 6502 CPU emulator
C#
3
star
26

dota2-api-viewer

A very primitive console application for querying some of the Dota 2 Web APIs.
C#
2
star
27

BoxGame

A prototype game engine and small sample game using OpenTK and BEPU Physics, running atop CoreCLR.
C#
2
star
28

Veldrid-Legacy

Repository containing old branches of Veldrid
C#
2
star
29

NetworkInformationApp

A small app that prints stuff retrieved from the System.Network.NetworkInformation library.
C#
2
star
30

VeldridNSViewExample

A basic example showing how to use Veldrid to render into an NSView.
C#
1
star