Skip to content

dinau/nimgl_test

Repository files navigation

Nimgl / ImGui demo program

Note: Using ImGui v1.89.9 (2023/09) https://github.com/dinau/nimgl-imgui
forked from https://github.com/daniel-j/nimgl-imgui .

Prerequisite


  • OS: Windows10 or later, Debian 12 Bookworm (Linux)

  • nim-1.6.20 or later

  • Download

    $ git clone https://github.com/dinau/nimgl_test
    $ cd nimgl_test
  • For Linux Debian 12 Bookworm or later

    $ sudo apt install xorg-dev libopengl-dev libgl1-mesa-dev

Install dependencies


$ pwd
nimgl_test
$ nimble build

Examples



$ pwd 
nimgl_test
$ cd examples/glfw_opengl3
$ make run

alt


$ pwd 
nimgl_test
$ cd examples/glfw_opengl3_image_load
$ make run

alt


$ pwd 
nimgl_test
$ cd examples/glfw_opengl3_implot
$ make run

alt


$ pwd 
nimgl_test
cd examples/imDrawListParty
$ make run

ImDrawList coding party - deadline Nov 30, 2020! #3606
This demo has been converted to Nim lang from two programs,
Curve
alt
and Real-time visualization of the interweb blogosphere.

alt alt


ImPlot demo with Japanese fonts

$ pwd 
nimgl_test
$ cd examples/implot_jp
$ make run

alt


$ pwd 
nimgl_test
$ cd examples/jpfont
$ make run

alt

IME for Japanese / 日本語入力(IME)について


以下のNim言語コンパイル / リンク時オプションを加えることで日本語入力を可能としている
オプションはバックエンドのC/C++コンパイラにのみ渡される

--passc:"-DIMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS"
--passL:"-limm32"

同じことをconfig.nims内に記述する場合は以下となる

switch "passC","-DIMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS"
switch "passL","-limm32"

My tools version


  • Nim Compiler Version 2.0.6
  • gcc.exe (Rev2, Built by MSYS2 project) 13.2.0-2
  • gcc-libs 13.2.0-2
  • binutils 2.41-3
  • git version 2.41.0.windows.3
  • make: GNU Make 4.2.1

参考


Dear ImGuiで日本語入力時のIMEの位置をいい感じにする
Viewport, Platform: Fixed IME positioning for multi-viewport. Moved API from...
ImGui で日本語と記号♥と絵文字😺の表示