Skip to content

Commit 68999e6

Browse files
committed
updated: for imgui 1.91.9bdock
1 parent 74e17b0 commit 68999e6

43 files changed

Lines changed: 1864 additions & 110 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
build_linux:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- uses: actions/checkout@v4
1616
- uses: jiro4989/setup-nim-action@v2

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
setenv.common.bat
2+
setenv.bat
3+
*.org
4+
*.old
15
# Created by https://www.gitignore.io/api/c,nim,osx,c++,linux,macos,windows,visualstudiocode
26
org.html
37
.hg

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
MAKEFLAGS += --no-print-directory
22

3-
all:
3+
all: savehash
44
$(MAKE) -C examples
55

66
.PHONEY: clean
7+
78
clean:
89
$(MAKE) -C examples clean
10+
11+
12+
savehash:
13+
$(MAKE) -C libs_hash $@

README.md

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
- [Prerequisite](#prerequisite)
66
- [Install dependencies](#install-dependencies)
77
- [Examples](#examples)
8-
- [glfw_opengl3.nim](#glfw_opengl3nim)
9-
- [glfw_opengl3_image_load.nim](#glfw_opengl3_image_loadnim)
10-
- [glfw_opengl3_implot.nim](#glfw_opengl3_implotnim)
11-
- [imDrawListParty.nim](#imdrawlistpartynim)
12-
- [implot_jp.nim](#implot_jpnim)
13-
- [jpFont.nim](#jpfontnim)
8+
- [rlimgui_basic (Naylib(Raylib) + rlImGui)](#rlimgui_basic-naylibraylib--rlimgui)
9+
- [glfw_opengl3](#glfw_opengl3)
10+
- [glfw_opengl3_image_load](#glfw_opengl3_image_load)
11+
- [glfw_opengl3_implot](#glfw_opengl3_implot)
12+
- [imDrawListParty](#imdrawlistparty)
13+
- [implot_jp](#implot_jp)
14+
- [jpFont](#jpfont)
1415
- [IME for Japanese / 日本語入力(IME)について](#ime-for-japanese--%E6%97%A5%E6%9C%AC%E8%AA%9E%E5%85%A5%E5%8A%9Bime%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6)
1516
- [Referrence](#referrence)
1617
- [My tools version](#my-tools-version)
@@ -21,18 +22,14 @@
2122

2223
### Nimgl / ImGui demo program
2324

24-
![alt](https://github.com/dinau/nimgl_test/actions/workflows/windows.yml/badge.svg)
25-
![alt](https://github.com/dinau/nimgl_test/actions/workflows/linux.yml/badge.svg)
26-
27-
**Note**: Using **ImGui v1.89.9** (2023/09) [https://github.com/dinau/nimgl-imgui](https://github.com/dinau/nimgl-imgui)
28-
forked from https://github.com/daniel-j/nimgl-imgui .
25+
**Note**: Using [Dear ImGui](https://github.com/ocornut/imgui) v1.91.9bdock (2025/10) with [nimgl/imgui](https://github.com/nimgl/imgui)
2926

3027
#### Prerequisite
3128

3229
---
3330

3431
- nim-2.2.4 or later
35-
- OS: Windows10 or later
32+
- OS: Windows11 or later
3633
- Download
3734

3835
```sh
@@ -60,10 +57,27 @@ forked from https://github.com/daniel-j/nimgl-imgui .
6057

6158
---
6259

63-
##### [glfw_opengl3.nim](examples/glfw_opengl3/glfw_opengl3.nim)
60+
##### rlimgui_basic (Naylib(Raylib) + rlImGui)
61+
62+
---
63+
64+
[rlimgui_basic.nim](examples/rlimgui_basic/rlimgui_basic.nim)
65+
66+
```sh
67+
$ pwd
68+
nimgl_test
69+
$ cd examples/rlimgui_basic
70+
$ make run
71+
```
72+
73+
![alt](https://github.com/dinau/imguin_examples/raw/main/img/rlimgui.gif)
74+
75+
##### glfw_opengl3
6476

6577
---
6678

79+
[glfw_opengl3.nim](examples/glfw_opengl3/glfw_opengl3.nim)
80+
6781
```sh
6882
$ pwd
6983
nimgl_test
@@ -74,10 +88,12 @@ forked from https://github.com/daniel-j/nimgl-imgui .
7488
![alt](img/glfw_opengl3.png)
7589

7690

77-
##### [glfw_opengl3_image_load.nim](examples/glfw_opengl3_image_load/glfw_opengl3_image_load.nim)
91+
##### glfw_opengl3_image_load
7892

7993
---
8094

95+
[glfw_opengl3_image_load.nim](examples/glfw_opengl3_image_load/glfw_opengl3_image_load.nim)
96+
8197
```sh
8298
$ pwd
8399
nimgl_test
@@ -87,10 +103,12 @@ forked from https://github.com/daniel-j/nimgl-imgui .
87103

88104
![alt](img/glfw_opengl3_image_load.png)
89105

90-
##### [glfw_opengl3_implot.nim](examples/glfw_opengl3_implot/glfw_opengl3_implot.nim)
106+
##### glfw_opengl3_implot
91107

92108
---
93109

110+
[glfw_opengl3_implot.nim](examples/glfw_opengl3_implot/glfw_opengl3_implot.nim)
111+
94112
```sh
95113
$ pwd
96114
nimgl_test
@@ -100,10 +118,12 @@ forked from https://github.com/daniel-j/nimgl-imgui .
100118

101119
![alt](img/glfw_opengl3_implot.png)
102120

103-
##### [imDrawListParty.nim](examples/imDrawListParty/imDrawListParty.nim)
121+
##### imDrawListParty
104122

105123
---
106124

125+
[imDrawListParty.nim](examples/imDrawListParty/imDrawListParty.nim)
126+
107127
```sh
108128
$ pwd
109129
nimgl_test
@@ -121,10 +141,12 @@ and [Real-time visualization of the interweb blogosphere](https://github.com/oco
121141
![alt](img/nimgl-imgui-coding-party-2023-08.png)
122142

123143

124-
##### [implot_jp.nim](examples/implot_jp/implot_jp.nim)
144+
##### implot_jp
125145

126146
---
127147

148+
[implot_jp.nim](examples/implot_jp/implot_jp.nim)
149+
128150
ImPlot demo with Japanese fonts
129151

130152
```sh
@@ -136,10 +158,12 @@ ImPlot demo with Japanese fonts
136158

137159
![alt](img/nimgl-implot-demo-jp-font-2023-10.png)
138160

139-
##### [jpFont.nim](examples/jpFont/jpFont.nim)
161+
##### jpFont
140162

141163
---
142164

165+
[jpFont.nim](examples/jpFont/jpFont.nim)
166+
143167
```sh
144168
$ pwd
145169
nimgl_test

examples/config.nims.common

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
switch "path","../../src"
1+
#switch "path","../../src"
2+
#switch "path","../../../nim_implot/src"
3+
#switch "path","../../../nimgl-imgui/src"
4+
25
switch "hint","User:off"
36
switch "hint","Name:off"
47
switch "hint","XDeclaredButNotUsed:off"
58

69
switch "warning","HoleEnumConv:off"
710

811

12+
913
#switch "passC","-std=c++17"
1014

1115
when defined(windows):
1216
switch "define", "release"
13-
discard
14-
#switch "define", "danger"
15-
#switch "opt", "size"
1617
else: # Linux
1718
switch "define", "release"
18-
discard
1919

2020
#const LTO = true # further reudce code size
2121
const LTO = false

examples/glfw_opengl3/imgui.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Collapsed=0
1010

1111
[Window][Nim: Dear ImGui test with Futhark]
1212
Pos=19,10
13-
Size=365,285
13+
Size=381,360
1414
Collapsed=0
1515

1616
[Window][imgui Another Window]

examples/glfw_opengl3/linkControl.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ else: # for Linux
1818

1919
#
2020
when STATIC_LINK_GLFW: # GLFW static link
21-
switch "define","glfwStaticLib"
21+
#switch "define","glfwStaticLib"
22+
discard
2223
else: # shared/dll
2324
when defined(windows):
2425
if TC == "vcc":

examples/glfw_opengl3_image_load/glfw_opengl3_image_load.nim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ proc winMain(hWin: glfw.GLFWWindow) =
125125
igStyleColorsClassic(nil)
126126

127127
# Add multibytes font
128-
var (fExistMultibytesFonts ,sActiveFontName, sActiveFontTitle) = setupFonts()
128+
var (fExistMultibytesFonts ,sActiveFontName, sActiveFontTitle, font) = setupFonts()
129129

130130
#-------------
131131
# Load image
@@ -202,10 +202,9 @@ proc winMain(hWin: glfw.GLFWWindow) =
202202
size = ImVec2(x: textureWidth.cfloat, y: textureHeight.cfloat)
203203
uv0 = Imvec2(x: 0, y: 0)
204204
uv1 = Imvec2(x: 1, y: 1)
205-
tint_col = ImVec4(x: 1, y: 1, z: 1, w: 1)
206205
border_col = ImVec4(x: 0, y: 0, z: 0, w: 0)
207206
igSetNextWindowSize(size,Always.ImGuiCond)
208-
igImage(cast[pointer](textureId), size, uv0, uv1, tint_col, border_col);
207+
igImage(cast[ImTextureID](textureId), size, uv0, uv1);
209208

210209
# render
211210
igRender()

examples/glfw_opengl3_implot/imgui.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Collapsed=0
2020

2121
[Window][Nim: Dear ImGui test with Futhark]
2222
Pos=14,7
23-
Size=358,285
23+
Size=436,303
2424
Collapsed=0
2525

2626
[Window][Delete?]
@@ -54,8 +54,8 @@ Size=128,71
5454
Collapsed=0
5555

5656
[Window][Plot Window]
57-
Pos=12,299
58-
Size=416,335
57+
Pos=13,322
58+
Size=434,335
5959
Collapsed=0
6060

6161
[Table][0x306783DE,3]

examples/imDrawListParty/imgui.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ Size=354,104
6969
Collapsed=0
7070

7171
[Window][Dear ImGui Metrics/Debugger]
72-
Pos=60,60
73-
Size=339,324
72+
Pos=414,97
73+
Size=508,324
7474
Collapsed=0
7575

7676
[Window][Example: Console]

0 commit comments

Comments
 (0)