Skip to content

Capati/odin-imgui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odin ImGui

Odin Language bindings for Dear ImGui v1.91.8-docking.

Table of Contents

Features

  • 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

Building ImGui requires utilizing a tool called premake found at https://premake.github.io. Although the process involves several steps, they are relatively straightforward.

Prerequisites

  • 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 or g++/clang on Unix

Windows

  1. Clone or download this repository

  2. Download and install premake5.exe.

    Either add to PATH or copy to project directory.

  3. Open a command window, navigate to the project directory and generate Visual Studio 2022 project files with desired backends:

    premake5 --backends=glfw,opengl3 vs2022
  4. From the project folder, open the directory build\make\windows, them open the generated solution ImGui.sln.

  5. 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.

Unix (macOS/Linux)

  1. Clone or download this repository

  2. Download and install premake5

  3. 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
  4. From the project folder, navigate to the generated build directory:

    cd build/make/linux
    # Or
    cd build/make/macosx
  5. 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.

TODO

  • Internal
  • Examples for reference

Acknowledgements

License

MIT License.

About

Odin Language bindings for Dear ImGui

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published