xImGui is a java binding for C++ dear-imgui.
It uses webidl file to generate java methods with the help of jParser.
It's meant to be small and 1-1 to C++. ImGui::Begin() is ImGui.Begin() and so on.
imgui-node-editor
ImGuiColorTextEdit
ImLayout
| Emscripten | Windows | Linux | Mac | Android | iOS |
|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ❌ |
- ✅: Have a working build.
⚠️ : Have a working build, but it's not ready yet.- ❌: Build not ready.
Note:
* Only snapshot builds are currently available.
* It's best to try the examples first to see how it works before adding to your project.
* There are 2 ImGui builds. The first contains ImGui only. The second (Ext) contains ImGui with extensions.
There are two ways to run examples.
- Build the source and run:
./gradlew :examples:basic:desktop:basic-run-desktop - Change LibExt.exampleUseRepoLibs to true in Dependencies.kt and that will make all examples use snapshot from repository
gdxVersion = "1.13.5"
xImGuiVersion = "-SNAPSHOT"
// Add repository to Root gradle
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}dependencies {
implementation("com.github.xpenatan.xImGui:gdx-gl-impl:$project.xImGuiVersion") // OpenGL
implementation("com.github.xpenatan.xImGui:gdx-wgpu-impl:$project.xImGuiVersion") // WebGPU
implementation("com.github.xpenatan.xImGui:imgui-core:$project.xImGuiVersion")
// Extensions
implementation "com.github.xpenatan.xImGui:imlayout-core:$project.xImGuiVersion"
implementation "com.github.xpenatan.xImGui:textedit-core:$project.xImGuiVersion"
implementation "com.github.xpenatan.xImGui:nodeeditor-core:$project.xImGuiVersion"
}dependencies {
implementation("com.github.xpenatan.xImGui:imgui-desktop:$project.xImGuiVersion")
// Extensions
implementation "com.github.xpenatan.xImGui:imlayout-desktop:$project.xImGuiVersion"
implementation "com.github.xpenatan.xImGui:textedit-desktop:$project.xImGuiVersion"
implementation "com.github.xpenatan.xImGui:nodeeditor-desktop:$project.xImGuiVersion"
}dependencies {
implementation("com.github.xpenatan.xImGui:imgui-teavm:$project.xImGuiVersion")
// Extensions
implementation "com.github.xpenatan.xImGui:imlayout-teavm:$project.xImGuiVersion"
implementation "com.github.xpenatan.xImGui:textedit-teavm:$project.xImGuiVersion"
implementation "com.github.xpenatan.xImGui:nodeeditor-teavm:$project.xImGuiVersion"
}- Requirements: Java 11, mingw64 and emscripten
- Windows only for now.
