Skip to content

Commit 5e03e80

Browse files
committed
docs: update README with SDL3 backend details and smoke test instructions
Expand the README to include information on the new SDL3 + SDL_GPU backend for `imgui-app`, configuration example, and instructions for running the smoke test using `MainSdl`. Adjust `example/build.gradle` to support dynamic main class selection via `-PmainClass`.
1 parent 668ce1e commit 5e03e80

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ consuming them as a dependency only needs JDK 8+ at runtime.
4747
git clone --recurse-submodules https://github.com/SpaiR/imgui-java.git
4848
cd imgui-java
4949
./gradlew :example:run
50+
# SDL3 + SDL_GPU backend smoke test:
51+
./gradlew :example:run -PmainClass=MainSdl
5052
```
5153

5254
`example/src/main/java/` contains a runnable showcase for every widget and extension — start with `Main.java`, then
@@ -64,6 +66,30 @@ Pick a module based on how much control you need:
6466
On Apple Silicon nothing extra is needed: the published macOS native is a universal binary covering both `x86_64` and
6567
`aarch64`.
6668

69+
### SDL3 backend (imgui-app)
70+
71+
`imgui-app` now supports two backends via `Configuration#setBackend(...)`:
72+
73+
- `Backend.GLFW` (default)
74+
- `Backend.SDL` (SDL3 + SDL_GPU)
75+
76+
Use SDL3 by switching backend in `configure(...)`:
77+
78+
```
79+
@Override
80+
protected void configure(final Configuration config) {
81+
config.setBackend(Backend.SDL);
82+
}
83+
```
84+
85+
For a ready smoke-test entry point, run `MainSdl`:
86+
87+
```
88+
./gradlew :example:run -PmainClass=MainSdl
89+
```
90+
91+
At the moment, SDL backend in `imgui-app` is focused on single-window flow (multi-viewport is not supported).
92+
6793
## Application
6894

6995
If you don't care about OpenGL and other low-level stuff, then you can use application layer from `imgui-app` module.

example/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ java {
99
}
1010

1111
application {
12-
mainClass = 'Main'
12+
mainClass = (findProperty('mainClass') ?: 'Main') as String
1313
try {
1414
if (libPath) {
1515
applicationDefaultJvmArgs = ["-Dimgui.library.path=$libPath"]

0 commit comments

Comments
 (0)