Skip to content

Commit b9e20ed

Browse files
committed
v1.75-0.5
1 parent db1e7c7 commit b9e20ed

File tree

6 files changed

+48
-30
lines changed

6 files changed

+48
-30
lines changed

README.md

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55
[![JCenter](https://img.shields.io/bintray/v/spair/io.imgui.java/lwjgl3.svg?label=lwjgl3)](https://bintray.com/spair/io.imgui.java/lwjgl3/_latestVersion)
66
[![javadoc](https://javadoc.io/badge2/io.imgui.java/binding/javadoc.svg)](https://javadoc.io/doc/io.imgui.java/binding)
77

8-
A handcrafted/generated Java binding for [Dear ImGui](https://github.com/ocornut/imgui) with no dependencies
9-
and ready to use pre-compiled binaries.
8+
A handcrafted Java binding for [Dear ImGui](https://github.com/ocornut/imgui) with no dependencies and ready to use pre-compiled binaries.
109

1110
It's a straightforward binding, which uses JNI to do a direct calls to Dear ImGui API.<br>
12-
Since we live in Java world - some things require to do them respectively to that fact. Please read **Binding notice**.
13-
Despite this fact, see official [documentation](https://github.com/ocornut/imgui#usage) and [wiki](https://github.com/ocornut/imgui/wiki)
14-
to get more info about how to do things in ImGui.
11+
Please read **Binding notice** to get more info about specific of the binding API.<br>
12+
See official [documentation](https://github.com/ocornut/imgui#usage) and [wiki](https://github.com/ocornut/imgui/wiki) to get more info about how to do things in ImGui.
1513

1614
Binding doesn't force you to use backend renderer which is introduced here. Feel free to use your own render engine if you need so.
17-
See how things are done in [ImGuiImplGl3](https://github.com/SpaiR/imgui-java/blob/v1.74-0.4.1/imgui-lwjgl3/src/main/java/imgui/gl3/ImGuiImplGl3.java).
15+
See how things are done in [ImGuiImplGl3](https://github.com/SpaiR/imgui-java/blob/v1.75-0.5/imgui-lwjgl3/src/main/java/imgui/gl3/ImGuiImplGl3.java).
1816

1917
Binding has the next version naming: `imguiVersion-bindingVersion`.<br>
2018
For example `1.74-0.1` means that binding uses `1.74` version of **ImGui** and binding itself has version `0.1`.
@@ -27,21 +25,55 @@ _Make sure you have installed Java 8 or higher._
2725
You can try this binding by yourself in a three simple steps:
2826

2927
```
30-
git clone --branch v1.74-0.4.1 https://github.com/SpaiR/imgui-java.git
28+
git clone --branch v1.75-0.5 https://github.com/SpaiR/imgui-java.git
3129
cd imgui-java
3230
gradlew :imgui-lwjgl3:startExample
3331
```
3432

35-
That's it! This will start an example app [ImGuiGlfwExample](https://github.com/SpaiR/imgui-java/blob/v1.74-0.4.1/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java)
36-
which relies on GLFW and LWJGL3. Feel free to modify [ImGuiGlfwExample#showUi](https://github.com/SpaiR/imgui-java/blob/v1.74-0.4.1/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java#L288)
33+
That's it! This will start an example app [ImGuiGlfwExample](https://github.com/SpaiR/imgui-java/blob/v1.75-0.5/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java)
34+
which relies on GLFW and LWJGL3. Feel free to modify [ImGuiGlfwExample#showUi](https://github.com/SpaiR/imgui-java/blob/v1.75-0.5/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java#L335)
3735
method to try different ImGui widgets in action.
3836

37+
**GIF with example:** https://imgur.com/a/E2rfuCR
38+
39+
## How to use
40+
3941
<details>
40-
<summary>GIF with example</summary>
41-
<img src="https://i.imgur.com/ZGHx4xf.gif"/>
42+
<summary><b>Usage ready build.gradle<b></summary>
43+
44+
repositories {
45+
jcenter()
46+
mavenCentral()
47+
}
48+
49+
switch (OperatingSystem.current()) {
50+
case OperatingSystem.LINUX:
51+
project.ext.nativesType = "natives-linux"
52+
break
53+
case OperatingSystem.WINDOWS:
54+
project.ext.nativesType = "natives-windows"
55+
break
56+
}
57+
58+
ext {
59+
lwjglVersion = '3.2.3'
60+
imguiVersion = '1.75-0.5'
61+
}
62+
63+
dependencies {
64+
implementation "io.imgui.java:binding:$imguiVersion"
65+
implementation "io.imgui.java:lwjgl3:$imguiVersion"
66+
runtimeOnly "io.imgui.java:$nativesType:$imguiVersion"
67+
68+
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
69+
70+
['', '-opengl', '-glfw'].each {
71+
implementation "org.lwjgl:lwjgl$it:$lwjglVersion"
72+
runtimeOnly "org.lwjgl:lwjgl$it::$nativesType"
73+
}
74+
}
4275
</details>
4376

44-
## How to use
4577
### Step 1
4678
Add jcenter repository:
4779
```
@@ -53,13 +85,13 @@ repositories {
5385
### Step 2
5486
Add binding dependency:
5587
```
56-
implementation 'io.imgui.java:binding:1.74-0.4.1'
88+
implementation 'io.imgui.java:binding:1.75-0.5'
5789
```
5890

5991
### Step 3
6092
If you want to use LWJGL3 renderer:
6193
```
62-
implementation 'io.imgui.java:lwjgl3:1.74-0.4.1'
94+
implementation 'io.imgui.java:lwjgl3:1.75-0.5'
6395
```
6496
**Disclaimer!**<br>
6597
LWJGL3 renderer is based on the `3.2.3` version of the [LWJGL](https://www.lwjgl.org/).
@@ -69,7 +101,7 @@ You can find how to do that [here](https://www.lwjgl.org/customize).
69101
### Step 4
70102
Add binary lib dependency:
71103
```
72-
runtimeOnly "io.imgui.java:$imguiNatives:1.74-0.4.1"
104+
runtimeOnly "io.imgui.java:$imguiNatives:1.75-0.5"
73105
```
74106
Where `imguiNatives` could be:
75107
- `natives-linux`
@@ -83,20 +115,6 @@ Or alternatively you can download binaries manually:<br>
83115
Go to the `/bin` folder and pick a native library for your OS. Then you'll need to provide `imgui.library.path` or `java.library.path`
84116
VM option with path to a folder where you placed downloaded file.
85117

86-
<details>
87-
<summary>Result build.gradle could look like this</summary>
88-
89-
repositories {
90-
jcenter()
91-
}
92-
93-
dependencies {
94-
implementation 'io.imgui.java:binding:1.74-0.4.1'
95-
implementation 'io.imgui.java:lwjgl3:1.74-0.4.1'
96-
runtimeOnly "io.imgui.java:natives-windows:1.74-0.4.1"
97-
}
98-
</details>
99-
100118
**You are ready to use imgui-java binding!**
101119

102120
#### Binding notice:

bin/imgui-java.dll

32 KB
Binary file not shown.

bin/imgui-java64.dll

29.5 KB
Binary file not shown.

bin/libimgui-java.so

40.1 KB
Binary file not shown.

bin/libimgui-java64.so

40.1 KB
Binary file not shown.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=1.74-0.4.1
1+
version=1.75-0.5

0 commit comments

Comments
 (0)