Dear Imgui wrapper using CImGui and Futhark with Nim language.
Included ImPlot / CImPlot module.
This project is under construction at this moment
-
Nim-1.6.10 or later
-
Add libraries
nimble install glfw nimgl sdl2_nim tinydialogs
-
For Linux Debian 11 Bullseye
$ sudo apt install xorg-dev libopengl-dev ibgl1-mesa-glx libgl1-mesa-dev
and for glfw3
$ sudo apt install libglfw3 libglfw3-dev
and for sdl2
$ sudo apt install libsdl2-dev
-
First clone this project,
git clone --recursive https://github.com/dinau/imguin
-
Sample program is here, examples.
For instance, glfw_opengl3.nim:cd imguin/examples/glfw_opengl3 make
After build, run
./glfw_opengl3(.exe)
. -
For selecting static link or dynamic link ,read this examples/README.md.
These screen shots are on Windows10.
-
glfw_opengl3_nimgl_imguin_jp.
Showing UTF-8 label text and input text with my local country language.
-
glfw_opengl3_implot.
Showing ImGui demo with ImPlot demo.
-
Git installed.
-
Windows10 or later
Clang/LLVM refer to Futhark installation.nimble install futhark
-
Linux Debian 11 Bullseye
sudo apt install libclang-dev nimble install --passL:"-L/usr/lib/llvm-11/lib" futhark
Important Notice: Confirm Futhark version is v0.9.1 or later.
nimble dump futhark
-
Update to latest definition files uisng Futhark,
pwd imguin cd src/updater make
ImGui/CImGui version is v1.89.5 at this time. (2023/05)
-
Update/Downgrade to the version that specified tag of CImGui for example,
pwd updater make CIMGUI=1.86 or make VER=1.86
- 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 changesrc/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.
- Whether can it do
nimble install imguin
? - Whether can it use
cimgui.dll
? (Now it can only be static link) 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 1.6.14
- gcc.exe (Rev7, Built by MSYS2 project) 13.1.0
- git version 2.41.0.windows.1
- SDL2.dll: SDL-release-2.26.4-0-g07d0f51fa (MinGW)
Debian 11 Bullseye
- Debian clang version 11.0.1-2
- gcc (Debian 10.2.1-6) 10.2.1 20210110
- git version 2.30.2
- Nim Compiler Version 1.6.12
- SDL2 ver.2.0.14