- ImGuin
Updated to latest ImGui/CImGui version: : v1.91.0dock (2024/08)
This project is my experiment project to use Nim language, ImGui, ImPlot, futhark and etc.
- Notice
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.
-
Nim-2.0.2 or later (Windows10 or Debian Linux)
-
MSys/MinGW command line tools (Unix tools), make, cp, rm, git, ...etc
-
For Linux Debian 12 Bookworm,
$ sudo apt install xorg-dev libopengl-dev libgl1-mesa-dev
and for glfw3 and sdl2,
$ sudo apt install libglfw3 libglfw3-dev $ sudo apt install libsdl2-dev
nimble uninstall imguin # Remove old version if exists.
nimble install https://github.com/dinau/imguin
-
First clone this project,
git clone https://github.com/dinau/imguin
-
Sample program is here, examples. For instance glfw_opengl3.nim,
cd imguin/examples/glfw_opengl3 make # or make run
After build, run
./glfw_opengl3(.exe)
-
For selecting static link or dynamic link ,read this examples/README.md.
These screen shots are on Windows10.
Showing UTF-8 label text and input text with my local country language.
Showing ImGui demo with ImPlot demo.
-
Git installed.
-
MSys/MinGW command line tools (Unix tools), make, cp, rm, ...etc
-
Windows10 or later Clang/LLVM refer to Futhark installation.
nimble install --passL:"-Lc:\llvm\lib" futhark
It must exist libclang.a file in the library path (e.g. "c:\llvm\lib").
-
Linux Debian 12 Bookworm
sudo apt install clang-16 nimble install --passL:"-L/usr/lib/llvm-16/lib" futhark
Important Notice: Confirm Futhark version is v0.13.2 at this time. (2024/06)
nimble dump futhark
name: "futhark"
version: "0.13.2"
author: "PMunch"
desc: "A package which uses libclang to parse C headers into Nim files for easy interop"
license: "MIT"
...
-
Compose development folders
First move to your working folder you like, thenmkdir imguin_dev cd imguin_dev git clone https://github.com/dinau/imguin cd imguin
-
Clone ImGui/CImGui etc. sources at once forever
pwd imguin make clonelibs
Cloned libraries to under
../libs/
folder. -
Checkout arbitrary version you like with git command at the each library folder,
../libs/cimgui
../libs/cimplot
../libs/cimnodes -
Generate the definition file uisng Futhark,
pwd imguin make gen
-
Install updated files
Properly edit the version info etc inimguin.nimble
file, thenpwd imguin nimble uninstall imguin # Remove old version if it exists. nimble install
That's all.
Repeat from3.
if you'd like to update or downgrade to other version.
-
Confirmed version
ImGui/CImGui Ver. ImguiN Ver. Date Windows10 Debian
Bookworm (1)1.91.0dock 1.91.0.1 2024/08 ok No checked ↑ 1.91.0.0 2024/08 ok No checked 1.90.9dock 1.90.9.4 2024/07 ok NG (5) ↑ 1.90.9.3 2024/07 ok NG (5) 1.90.8dock 1.90.8.1 2024/06 ok NG (5) ↑ 1.90.8.0 2024/06 ok NG (5) 1.90.7dock 1.90.7.0 2024/05 ok NG (5) 1.90.6dock 1.90.6.1 2024/05 ok NG (5) 1.90.4dock 1.90.4.3 2024/04 ok NG (5) - - - - - ↑ 1.90.4.2 2024/02 ok OK (4) 1.90.1dock 1.90.1.0 2024/01 ok NG/OK(1)(3)(4) 1.89.9dock 1.89.9.8 2023/12 ok NG/OK(1)(3)(4) Notice(1): Except imnodes and SDL2 example.
Notice(2): Doesn't work well.
Notice(3): Works well only if it is compiled debug mode.
Notice(4): Use nim-2.0.2
Notice(5): I don't know why can't be compiled on Lunux.
You might be able to use another C/C++ compiler,
Clang, vcc(Visual Studio C/C++) , zig cc
by changing variable TC
in examples/config.nims.common.
- examples/sdl2_opengl3
-
If you are on Windows OS 32bit, you should get
SDL2.dll
for instance from release-2.26.4.- Unzip SDL2-2.26.4-win32-x86.zip
- Copy SDL2.dll to examples/sdl2_opengl3 folder.
-
On Windows OS, it needs dev tool to compile SDL2 app, SDL2-devel-2.26.4-mingw.zip for instance "SDL.h","-lSDL2.dll" etc and change
src/imguin/sdl2_opengl.nim
{.passC:"-Id:/msys32/mingw32/include/SDL2".} {.passL:"-Ld:/msys32/mingw32/lib -lSDL2.dll".}
you need to properly change the above folder name depending on your settings. See src/imguin/sdl2_opengl.nim
-
- Easier compilation for SDL2 app.
Added: ImNodes/CImNodes(2023/10)Done- Whether can it use
cimgui.dll
? (Now it can only be static link) Unfortunately ImGui 1.89.7 dosn't work well at this moment.(2023/07)Done. (2023/08)Whether can it doDone (2023/09) (#Issue 13)nimble install imguin
?Add Font Awesome (Icon Font) demo.Done (2023/04).Can it compile with MSVC (--cc:vcc) ?Done. Except SDL2 demo. (2023/03)Can it compile with Clang (--cc:clang) ?Done. (2023/03)Add SDL2 example.Done. examples/sdl2_opengl3 (2023/03)
- First step is done. (2023/03)
Windows10 (main)
- Nim Compiler Version 2.0.8
- Gcc.exe (Rev3, Built by MSYS2 project) 14.1.0
Gcc.exe (MinGW-W64...) 11.1.0 (Nim offical)- Clang version 18.1.8
- git version 2.45.2.windows.3
- SDL2.dll: 2.30.3
- make: GNU Make 4.4.1
- MSys2/MinGW tools
- Microsoft Visual Studio C/C++ 2019
- Zig: 0.12.0 (clang version 17.0.6)
Debian 12 Bookworm
- Nim Compiler Version 2.0.4
- Gcc (Debian 12.2.0-14) 12.2.0
- Git version 2.39.2
- GNU Make 4.3
- SDL2 ver.2.26.5
-
File Dialog
-
Other
-
GUI
-
Graphical
- Dear ImGui
Language | Binding | Project |
---|---|---|
Nim | CImGui/CImPlot | ImGuin, Nimgl_test, Nim_implot |
Lua | CImGui/CImPlot etc. | LuaJITImGui |
Zig, C lang. | Dear bindings | Dear_Bindings_Build |
Zig | CImGui/CImPlot | ImGuinZ |
Python | ImGui direct | DearPyGui for 32bit WindowsOS Binary |