Skip to content

dinau/imguin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImGuin

alt alt

Updated to latest Dear ImGui / CImGui version: : v1.92.0 dock (2025/07)

This project is Dear ImGui wrapper library for Nim language 1.

Screen shot


Note: See examples project ImGuin_examples

alt

tglfw_opengl3.nim

Prerequisites


  • Nim-2.0.16 or later

  • Windows10 or later
    MSys2/MinGW command line tools (Unix tools), make, cp, rm, git, ...etc

  • Linux: Ubuntu / Debian families

    $ sudo apt install gcc g++ make git 
    $ sudo apt install libopengl-dev libgl1-mesa-dev
    $ sudo apt install libglfw3 libglfw3-dev libsdl2-dev

Install


nimble refresh
nimble uninstall imguin  # Remove old versions if exists. 
nimble install imguin

Available libraries


Library name / C lang. wrapper

Frontends and Backends


GLFW 2 SDL2 2 SDL3 2
OpenGL3 backend v v v
SDL2 backend - v -
SDL3 GPU / Renderer backend - - v
Vulkan backend ? ? ?

Update / Downgrade Dear ImGui and CImGui


  • Prerequisite

    1. Windows10 or later Clang/LLVM refer to Futhark installation.

      nimble install futhark

      It must exist libclang.a file in the library path (e.g. in c:\llvm\lib).

    2. Linux Debian / Ubuntu families

      sudo apt install  clang-16
      nimble install --passL:"-L/usr/lib/llvm-16/lib" futhark

    Important Notice: Confirm Futhark version is v0.15.0 at this time.

    nimble dump futhark
  • Update / Downgrade ImGui/CImGui

    1. Compose development folders
      First move to your working folder you like, then

      mkdir imguin_dev
      cd imguin_dev
      git clone https://github.com/dinau/imguin
      cd imguin
    2. Clone ImGui/CImGui etc. sources at once forever

      pwd
      imguin
      make clonelibs

      Cloned libraries are under ../libs/ folder

    3. Recursively update the sources using git Pull or fetch in the each library folder,
      ../libs/cimgui
      ../libs/cimguizmo
      ../libs/cimnodes
      ../libs/cimplot
      ... snip ...

    4. Checkout arbitrary version with git command in the respective folder

    5. Specify your Clang include path to ClangIncludePath in imguin/src/imguin/cimgui.nim.

    6. Generate the definition file uisng Futhark,

      pwd
      imguin
      make gen
    7. Install updated files
      Properly edit the version info etc in imguin.nimble file, then

      pwd
      imguin
      nimble uninstall imguin  # Remove old versions if it exists. 
      nimble install 

      That's all.
      Repeat from 3. if you'd like to update or downgrade to other version.

  • Confirmed version
    Windows OS is all OK.

    ImGui/CImGui Ver. ImGuin Ver. Date Linux Debian Family (3)
    1.92.0 dock 1.92.0.1 2025/07 OK
    1.91.9b dock 1.91.9.4 2025/06 OK
    1.91.8dock 1.91.8.2 2025/03 OK
    1.91.6dock 1.91.6.15 2025/01 (4)
    1.91.4dock 1.91.4.2 2024/12 OK
    1.91.3dock 1.91.3.1 2024/10 (4)
    1.91.2dock 1.91.2.0 2024/10 (4)
    1.91.1dock 1.91.1.2 2024/09 Except ImNodes example
    1.91.0dock 1.91.0.0 2024/08 (4)
    1.90.4dock 1.90.4.2 2024/02 Use nim-2.0.2
    1.89.9dock 1.89.9.8 2023/12 OK (1)(2)

    (1) Except imnodes and SDL2 example.
    (2) Works well only if it is compiled debug mode.
    (3) Dedian / Ubuntu familiy.
    (4) Doesn't check, but probably will work well.

TODO


  1. Whether can it use cimgui.dll ? (Now it can only be static link) Closed. Only be static link.
  2. Easier compilation for SDL2 app. (2024/09) Done.
  3. Added: ImNodes/CImNodes (2023/10) Done
  4. Unfortunately ImGui 1.89.7 dosn't work well at this moment.(2023/07) Done. (2023/08)
  5. Whether can it do nimble install imguin ? Done (2023/09) (#Issue 13)
  6. Add Font Awesome (Icon Font) demo. Done (2023/04).
  7. Can it compile with MSVC (--cc:vcc) ? Done. Except SDL2 demo. (2023/03), TODO (2024/09)
  8. Can it compile with Clang (--cc:clang) ? Done. (2023/03)
  9. Add SDL2 example. Done. examples/sdl2_opengl3 (2023/03)
  • First step is done. (2023/03)

My tools version


Windows11 (main)

  • Nim Compiler Version 2.2.4

  • GCC (Rev1, Built by MSYS2 project) 15.1.0

    pacman -S mingw-w64-ucrt-x86_64-gcc
  • Clang version 20.1.7

    pacman -S mingw-w64-ucrt-x86_64-clang
  • Visual Studio C++/C 2022

  • git version 2.46.0.windows.1

  • Make: GNU Make 4.4.1

  • MSys2/MinGW tools

Linux Debian

  • Nim Compiler Version 2.2.4
  • gcc 12.2.0
  • make: GNU Make 4.3
  • git version 2.39.5

Other link


Language 3 Project
Lua Script LuaJITImGui
NeLua Compiler NeLuaImGui
Nim Compiler ImGuin, Nimgl_test, Nim_implot
Python Script DearPyGui for 32bit WindowsOS Binary
Ruby Script igRuby_Examples
Zig, C lang. Compiler Dear_Bindings_Build
Zig Compiler ImGuinZ
  • SDL Game tutorial Platfromer

    ald

Language 3 SDL Project
LuaJIT Script SDL2 LuaJIT-Platformer
Nelua Compiler SDL2 NeLua-Platformer
Nim Compiler SDL3 / SDL2 Nim-Platformer-sdl2/ Nim-Platformer-sdl3
Ruby Script SDL3 Ruby-Platformer
Zig Compiler SDL2 Zig-Platformer
  • Other link2

  • Memo

    error: assignment to 'char **' from incompatible pointer type 'const char * const*' [-Wincompatible-pointer-types]
    type ConstCstring {.importc: const char *.} = cstring

Footnotes

  1. It may be better to use the mainstream project nimgl/imgui (ImGui v1.85)
    ,updated project nimgl-imgui (ImGui v1.89.9) ,sub project nim_implot and test project nimgl_test,
    or https://github.com/daniel-j/nimgl-imgui (ImGui v1.91.1)

  2. Front end 2 3

  3. Alphabectial order 2