This commit is contained in:
SpaiR committed 2021-03-09 18:23:05 +02:00
1 parent c50ea93675
commit 8b5af12b76
2 files changed
+13 -13

No files matched your search

+12 -12
View File
@@ -19,10 +19,10 @@ JNI based binding for [Dear ImGui](https://github.com/ocornut/imgui) with no dep
Read official [documentation](https://github.com/ocornut/imgui#usage) and [wiki](https://github.com/ocornut/imgui/wiki) to see how to work with Dear ImGui. Read official [documentation](https://github.com/ocornut/imgui#usage) and [wiki](https://github.com/ocornut/imgui/wiki) to see how to work with Dear ImGui.
Almost everything from C++ could be done in Java in the same way. Almost everything from C++ could be done in Java in the same way.
Binding has an OpenGL renderer and a GLFW backend implementation, using a [LWJGL3](https://www.lwjgl.org/) library. Could be found in [imgui-lwjgl3](https://github.com/SpaiR/imgui-java/blob/v1.81.1/imgui-lwjgl3) module.<br> Binding has an OpenGL renderer and a GLFW backend implementation, using a [LWJGL3](https://www.lwjgl.org/) library. Could be found in [imgui-lwjgl3](https://github.com/SpaiR/imgui-java/blob/v1.81.2/imgui-lwjgl3) module.<br>
They are recommended, yet optional to use. The advantage of Dear ImGui is a portability, so feel free to copy-paste classes or write your own implementations.<br> They are recommended, yet optional to use. The advantage of Dear ImGui is a portability, so feel free to copy-paste classes or write your own implementations.<br>
Additionally, there is an [imgui-app](https://github.com/SpaiR/imgui-java/blob/v1.81.1/imgui-app) module, which provides **a high abstraction layer**.<br> Additionally, there is an [imgui-app](https://github.com/SpaiR/imgui-java/blob/v1.81.2/imgui-app) module, which provides **a high abstraction layer**.<br>
It hides all low-level stuff under one class to extend, so you can build your GUI application instantly. It hides all low-level stuff under one class to extend, so you can build your GUI application instantly.
### Features ### Features
@@ -47,12 +47,12 @@ _Make sure you have installed Java 8 or higher._
You can try binding by yourself in three simple steps: You can try binding by yourself in three simple steps:
``` ```
git clone --branch v1.81.1 https://github.com/SpaiR/imgui-java.git git clone --branch v1.81.2 https://github.com/SpaiR/imgui-java.git
cd imgui-java cd imgui-java
./gradlew :example:start ./gradlew :example:start
``` ```
See [example](https://github.com/SpaiR/imgui-java/blob/v1.81.1/example) module to try other widgets in action. See [example](https://github.com/SpaiR/imgui-java/blob/v1.81.2/example) module to try other widgets in action.
# How To Use # How To Use
**[ImGui in LWJGL YouTube video](https://youtu.be/Xq-eVcNtUbw)** by [GamesWithGabe](https://www.youtube.com/channel/UCQP4qSCj1eHMHisDDR4iPzw).<br> **[ImGui in LWJGL YouTube video](https://youtu.be/Xq-eVcNtUbw)** by [GamesWithGabe](https://www.youtube.com/channel/UCQP4qSCj1eHMHisDDR4iPzw).<br>
@@ -61,7 +61,7 @@ You can use this video as a basic step-by-step tutorial. It shows how to integra
Take a note, that integration itself is a very flexible process. It could be done in one way or another. If you just need a framework for your GUI - use **Application** module. Otherwise, if you need more control, the best way is not just to repeat steps, but to understand what each step does. Take a note, that integration itself is a very flexible process. It could be done in one way or another. If you just need a framework for your GUI - use **Application** module. Otherwise, if you need more control, the best way is not just to repeat steps, but to understand what each step does.
## Application ## Application
If you don't care about OpenGL or other low-level stuff, then you can use application layer from [imgui-app](https://github.com/SpaiR/imgui-java/blob/v1.81.1/imgui-app) module. If you don't care about OpenGL or other low-level stuff, then you can use application layer from [imgui-app](https://github.com/SpaiR/imgui-java/blob/v1.81.2/imgui-app) module.
It is a **one jar solution** which includes: GLFW, OpenGL and Dear ImGui itself. So you only need **one dependency** line or **one jar in classpath** to make everything to work. <ins>You don't need to add separate dependencies to LWJGL or native libraries, since they are already included.</ins><br> It is a **one jar solution** which includes: GLFW, OpenGL and Dear ImGui itself. So you only need **one dependency** line or **one jar in classpath** to make everything to work. <ins>You don't need to add separate dependencies to LWJGL or native libraries, since they are already included.</ins><br>
Application module is the best choice if everything you care is the GUI for your app. Application module is the best choice if everything you care is the GUI for your app.
@@ -102,7 +102,7 @@ repositories {
} }
dependencies { dependencies {
implementation "io.github.spair:imgui-java-app:1.81.1" implementation "io.github.spair:imgui-java-app:1.81.2"
} }
``` ```
</details> </details>
@@ -115,7 +115,7 @@ dependencies {
<dependency> <dependency>
<groupId>io.github.spair</groupId> <groupId>io.github.spair</groupId>
<artifactId>imgui-java-app</artifactId> <artifactId>imgui-java-app</artifactId>
<version>1.81.1</version> <version>1.81.2</version>
</dependency> </dependency>
</dependencies> </dependencies>
``` ```
@@ -131,7 +131,7 @@ dependencies {
## Binding ## Binding
Using binding without the wrapper requires to "attach" it to your application manually. Using binding without the wrapper requires to "attach" it to your application manually.
You can refer to [imgui-app](https://github.com/SpaiR/imgui-java/blob/v1.81.1/imgui-app) module and see how things are done there. You can refer to [imgui-app](https://github.com/SpaiR/imgui-java/blob/v1.81.2/imgui-app) module and see how things are done there.
#### Dependencies #### Dependencies
For simplicity, example of dependencies for Gradle and Maven only show how to add natives for Windows.<br> For simplicity, example of dependencies for Gradle and Maven only show how to add natives for Windows.<br>
@@ -149,7 +149,7 @@ repositories {
ext { ext {
lwjglVersion = '3.2.3' lwjglVersion = '3.2.3'
imguiVersion = '1.81.1' imguiVersion = '1.81.2'
} }
dependencies { dependencies {
@@ -174,7 +174,7 @@ dependencies {
``` ```
<properties> <properties>
<lwjgl.version>3.2.3</lwjgl.version> <lwjgl.version>3.2.3</lwjgl.version>
<imgui.java.version>1.81.1</imgui.java.version> <imgui.java.version>1.81.2</imgui.java.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
@@ -252,9 +252,9 @@ dependencies {
</details> </details>
## Extensions ## Extensions
- [ImNodes](https://github.com/Nelarius/imnodes/tree/868dda60d5829aec9a736cec7ff6be1299d543c0) | [Example](https://github.com/SpaiR/imgui-java/blob/v1.81.1/example/src/main/java/ExampleImNodes.java) <br> - [ImNodes](https://github.com/Nelarius/imnodes/tree/868dda60d5829aec9a736cec7ff6be1299d543c0) | [Example](https://github.com/SpaiR/imgui-java/blob/v1.81.2/example/src/main/java/ExampleImNodes.java) <br>
A small, dependency-free node editor for dear imgui. (A good choice for simple start.) A small, dependency-free node editor for dear imgui. (A good choice for simple start.)
- [imgui-node-editor](https://github.com/thedmd/imgui-node-editor/tree/687a72f940c76cf5064e13fe55fa0408c18fcbe4) | [Example](https://github.com/SpaiR/imgui-java/blob/v1.81.1/example/src/main/java/ExampleImGuiNodeEditor.java) <br> - [imgui-node-editor](https://github.com/thedmd/imgui-node-editor/tree/687a72f940c76cf5064e13fe55fa0408c18fcbe4) | [Example](https://github.com/SpaiR/imgui-java/blob/v1.81.2/example/src/main/java/ExampleImGuiNodeEditor.java) <br>
Node Editor using ImGui. (A bit more complex than ImNodes, but has more features.) Node Editor using ImGui. (A bit more complex than ImNodes, but has more features.)
# Binding Notice # Binding Notice
+1 -1
View File
@@ -1 +1 @@
version=1.81.1 version=1.81.2