foxoman / imguin

Dear Imgui / CImGui wrapper for Nim language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImGuin

Dear Imgui wrapper using CImGui and Futhark with Nim language.
Included ImPlot / CImPlot module.

This project is under construction at this moment

Usage: Sample program and run


Prerequisites


  1. Nim-1.6.10 or later

  2. Add libraries

    nimble install glfw nimgl sdl2_nim tinydialogs
  3. 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

Build


  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


These screen shots are on Windows10.

Update to latest Dear ImGui and CImGui

Prerequisite


  1. Git installed.

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

    nimble install futhark 
  3. 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 ImGui/CImGui


  • 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 notice


TODO


  1. Easier compilation for SDL2 app.
  2. Whether can it do nimble install imguin ?
  3. Whether can it use cimgui.dll ? (Now it can only be static link)
  4. Add Font Awesome (Icon Font) demo. Done (2023/04).
  5. Can it compile with MSVC (--cc:vcc) ? Done. Except SDL2 demo. (2023/03)
  6. Can it compile with Clang (--cc:clang) ? Done. (2023/03)
  7. Add SDL2 example. Done. examples/sdl2_opengl3 (2023/03)
  • First step is done. (2023/03)

My tools version


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

Other link


About

Dear Imgui / CImGui wrapper for Nim language

License:MIT License


Languages

Language:Nim 99.9%Language:Makefile 0.1%