Skip to content

Commit 3402de9

Browse files
authored
Update README.md
1 parent 727ce03 commit 3402de9

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# imgui-java
22
[![Build Status](https://travis-ci.org/SpaiR/imgui-java.svg?branch=master)](https://travis-ci.org/SpaiR/imgui-java) [![javadoc](https://javadoc.io/badge2/io.imgui.java/binding/javadoc.svg)](https://javadoc.io/doc/io.imgui.java/binding) [![JCenter](https://img.shields.io/bintray/v/spair/io.imgui.java/binding.svg?label=binding)](https://bintray.com/spair/io.imgui.java/binding/_latestVersion) [![JCenter](https://img.shields.io/bintray/v/spair/io.imgui.java/lwjgl3.svg?label=lwjgl3)](https://bintray.com/spair/io.imgui.java/lwjgl3/_latestVersion)
33

4-
JNI based binding for [Dear ImGui](https://github.com/ocornut/imgui) with no dependencies, ready to use pre-compiled binaries and a renderer for [LWJGL3](https://www.lwjgl.org/).
4+
JNI based binding for [Dear ImGui](https://github.com/ocornut/imgui) with no dependencies, ready to use pre-compiled binaries and renderer for [LWJGL3](https://www.lwjgl.org/).
55

66
Please read **Binding Notice** to get more info about java-specific things of the API.<br>
77
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 Dear ImGui.
88

9-
imgui-java provides all the data you need to render Dear ImGui. If, for some reason, you want to use your own backend renderer, see how things are done in [ImGuiImplGl3](https://github.com/SpaiR/imgui-java/blob/v1.76-0.9/imgui-lwjgl3/src/main/java/imgui/gl3/ImGuiImplGl3.java).
9+
Binding provides all the data you need to render Dear ImGui. If, for some reason, you want to use your own backend renderer, see how things are done in [ImGuiImplGl3](https://github.com/SpaiR/imgui-java/blob/v1.76-0.9/imgui-lwjgl3/src/main/java/imgui/gl3/ImGuiImplGl3.java).
1010

11-
Binding has the next versioning semantic: `imguiVersion-bindingVersion`.<br>
11+
Next versioning semantic is used: `imguiVersion-bindingVersion`.<br>
1212
For example `1.74-0.1` means that imgui-java uses `1.74` version of Dear ImGui and binding itself has the version `0.1`.
1313

1414
*Some of the very specific features are still in a wip state.*
@@ -41,25 +41,25 @@ ext {
4141
imguiVersion = '1.76-0.9'
4242
}
4343
44+
switch (org.gradle.internal.os.OperatingSystem.current()) {
45+
case OperatingSystem.LINUX:
46+
project.ext.natives = "natives-linux"
47+
break
48+
case OperatingSystem.WINDOWS:
49+
project.ext.natives = System.getProperty("os.arch").contains("64") ? "natives-windows" : "natives-windows-x86"
50+
break
51+
}
52+
4453
dependencies {
4554
implementation "io.imgui.java:binding:$imguiVersion"
4655
implementation "io.imgui.java:lwjgl3:$imguiVersion"
47-
48-
// Include all available natives, but it's likely that you want something specific
49-
runtimeOnly "io.imgui.java:natives-windows:$imguiVersion"
50-
runtimeOnly "io.imgui.java:natives-windows-x86:$imguiVersion"
51-
runtimeOnly "io.imgui.java:natives-linux:$imguiVersion"
52-
runtimeOnly "io.imgui.java:natives-linux-x86:$imguiVersion"
56+
runtimeOnly "io.imgui.java:$natives:$imguiVersion"
5357
5458
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
5559
5660
['', '-opengl', '-glfw'].each {
5761
implementation "org.lwjgl:lwjgl$it:$lwjglVersion"
58-
59-
// Include all available natives, but it's likely that you want something specific
60-
runtimeOnly "org.lwjgl:lwjgl$it::natives-windows"
61-
runtimeOnly "org.lwjgl:lwjgl$it::natives-windows-x86"
62-
runtimeOnly "org.lwjgl:lwjgl$it::natives-linux"
62+
runtimeOnly "org.lwjgl:lwjgl$it::$natives"
6363
}
6464
}
6565
```
@@ -69,14 +69,14 @@ Alternatively you can download imgui-java binaries manually from the [release pa
6969
**You are ready to use imgui-java binding!**
7070

7171
## Using FreeType
72-
Dear ImGui by default uses an stb_strutype library to render a fonts atlas. It's possible to use FreeType instead to get better fonts quality. See an example in [ImGuiGlfwExample](https://github.com/spair/imgui-java/blob/v1.76-0.9/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java#L279). [Read more](https://github.com/ocornut/imgui/blob/v1.76/misc/freetype/README.md)
72+
Dear ImGui by default uses an stb_strutype library to render a fonts atlas. It's possible to use FreeType instead to get better fonts quality. See an example in [ImGuiGlfwExample](https://github.com/spair/imgui-java/blob/v1.76-0.9/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java). [Read more](https://github.com/ocornut/imgui/blob/v1.76/misc/freetype/README.md)
7373

7474
## Binding Notice
7575
* All Dear ImGui methods are available in `camelCase`, not in `PascalCase`.
7676
* To **pass** `ImVec2`/`ImVec4` - provide two/four float numbers.
7777
To **get** `ImVec2`/`ImVec4` - provide a destination object.
7878
* To get an input/output to/from Dear ImGui - use primitive wrappers: `ImBool`, `ImInt` etc.
79-
* Due to the Java and JNI restrictions we can't provide a fully fledged callbacks to the ImGui::InputText* methods.
79+
* Due to the Java and JNI restrictions we can't provide a fully fledged callbacks to the `ImGui::InputText` methods.
8080
To replace some of the features use an ImGuiInputTextData class.
8181
* Read [javadoc](https://javadoc.io/doc/io.imgui.java/binding) and sources comments to get more info.
8282

@@ -86,7 +86,7 @@ to build specific binaries you need. After everything is configured, run `gradle
8686
That will build native libraries and place them in `imgui-binding/build/libsNative` folder.
8787

8888
## Credits
89-
This binding is partly based on the work of [xpenatan](https://github.com/xpenatan) and his version [jDear-imgui](https://github.com/xpenatan/jDear-imgui).
89+
Binding is partly based on the work of [xpenatan](https://github.com/xpenatan) and his version [jDear-imgui](https://github.com/xpenatan/jDear-imgui).
9090

9191
## License
9292
See the LICENSE file for license rights and limitations (Apache-2.0).

0 commit comments

Comments
 (0)