Odin Language bindings for Dear ImGui v1.91.8-docking.
- Uses dear_bindings to generate the C API.
- Generates bindings for the
docking
ImGui branch - Generator is written in Odin
- Names are in Odin naming convention
- Contains bindings for most of the backends
- All backends which exist in vendor have bindings
- These include:
dx11
,dx12
,glfw
,metal
,opengl3
,osx
,sdl2
,sdl3
,sdlgpu3
,sdlrenderer2
,sdlrenderer3
,vulkan
,wgpu
,win32
Building ImGui requires utilizing a tool called premake found at https://premake.github.io. Although the process involves several steps, they are relatively straightforward.
- Premake5 - the build configuration
- You can download the Pre-Built Binaries, simply need to be unpacked and placed somewhere on the system search path or any other convenient location.
- For Unix, also requires GNU libc 2.38.
- Git - required for clone backend dependencies
- Python - version 3.3.x is required by dear_bindings
and
venv
(Python Virtual Environment) - C++ compiler -
vs2022
on Windows org++/clang
on Unix
-
Clone or download this repository
-
Download and install premake5.exe.
Either add to PATH or copy to project directory.
-
Open a command window, navigate to the project directory and generate Visual Studio 2022 project files with desired backends:
premake5 --backends=glfw,opengl3 vs2022
-
From the project folder, open the directory
build\make\windows
, them open the generated solution ImGui.sln. -
In Visual Studio, confirm that the dropdown box at the top says “x64” (not “x86”); and then use Build > Build Solution.
The generated library file
imgui_windows_x64.lib
will be located in the root of the project directory.
If you do not have Visual Studio installed, you can use the Build Tools for Visual Studio 2022, which includes only the required tools to build.
-
Follow the steps above to use
premake5
for generating the project files. -
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio.
-
Make sure you have the required folder in the PATH:
<portable-msvc>\msvc\VC\Auxiliary\Build
- forvcvars64.bat
<portable-msvc>\msvc\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64
- forcl
andlib
-
Open a command window, navigate to the
build
directory, and locate thebuild.bat
file. This batch file will use the generated project files to build ImGui. -
Compile and link ImGui:
build.bat
-
Clone or download this repository
-
Download and install premake5
-
Open a terminal window, navigate to the project directory and generate the makefiles with desired backends:
premake5 --backends=glfw,opengl3 gmake2 # On macOS, you can also use Xcode: premake5 --backends=glfw,opengl3 xcode4
-
From the project folder, navigate to the generated build directory:
cd build/make/linux # Or cd build/make/macosx
-
Compile the project using the
make
command:make config=release_x86_64 # Or for debug build: # make config=debug_x86_64
On macOS, the
make
command might need different configuration flags:make config=release_x86_64 # For Intel Macs # or make config=release_arm64 # For Apple Silicon (M1/M2/M3) Macs
The generated library file will be located in the root of the project directory.
- Internal
- Examples for reference
- odin-imgui
- Odin Language - Odin Programming Language
- Dear Bindings - Tool to generate the C API
- Dear ImGui - The original ImGui library
MIT License.