Skip to content

dinau/imguin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImGuin

Latest ImGui/CImGui version: : v1.90.6dock (2024/05)

Notice:
This project is my experiment project to use Nim language, ImGui, ImPlot, futhark and etc.
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.

Usage: Sample program and run


Prerequisites


  • Nim-2.0.2 or later (Windows10 or Debian Linux)

  • 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

Install


nimble install https://github.com/dinau/imguin

Build examples


  1. First clone this project,

    git clone --recursive https://github.com/dinau/imguin
  2. Sample program is here, examples. For instance glfw_opengl3.nim,

    cd imguin/examples/glfw_opengl3
    make

    After build, run ./glfw_opengl3(.exe)

  3. For selecting static link or dynamic link ,read this examples/README.md.

Screen shot (examples)


These screen shots are on Windows10.

alt

alt

Showing UTF-8 label text and input text with my local country language.
alt

Showing ImGui demo with ImPlot demo.
alt
alt

alt

My test app movie using imguin

Sample movie,Youtube

Update to latest Dear ImGui and CImGui

Prerequisite


  1. Git installed.

  2. 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").

  3. 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.12.5 at this time. (2024/03)

nimble dump futhark

name: "futhark"
version: "0.12.5"
author: "PMunch"
desc: "A package which uses libclang to parse C headers into Nim files for easy interop"
license: "MIT"
...

Update ImGui/CImGui


  • Update to latest definition files uisng Futhark,

    pwd
    imguin
    cd src/imguin/private/updater
    make
  • Update/Downgrade to the version specified tag for example,

    pwd
    updater
    make VER=1.89.9dock
    or
    make CIMGUI=1.89.9dock
  • Confirmed version

    Command imguin Ver. Date Windows10 Debian
    Bookworm
    make VER=1.90.6dock 1.90.6.0 2024/05 ok NG Notice(2)
    make VER=1.90.4dock 1.90.4.2 2024/02 ok ok Notice(1)
    make VER=1.90.1dock 1.90.1.0 2024/01 ok NG Notice(2)
    make VER=1.89.9dock 1.89.9.8 2023/12 ok NG

    Notice(1) : Except imnodes and SDL2 example. Notice(2) NG: Doesn't work well.

Examples notice


TODO


  1. Easier compilation for SDL2 app.
  2. Added: ImNodes/CImNodes (2023/10)Done
  3. Whether can it use cimgui.dll ? (Now it can only be static link)
  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)
  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


Windows10 (main)

  • Nim Compiler Version 2.0.4
  • gcc.exe (Rev3, Built by MSYS2 project) 13.2.0-2
  • gcc-libs 13.2.0-2
  • binutils 2.41-3
  • clang version 18.1.4
  • git version 2.41.0.windows.3
  • SDL2.dll: 2.30.3
  • make: GNU Make 4.2.1
  • MSys2/MinGW tools

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

Debian 11 Bullseye (Obsoleted) 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

Other link


Similar project


LuaJITImGui

nimgl_test

nim_implot

DearPyGui for 32bit WinodwsOS Binary