import com.raylib.Raylib;
import static com.raylib.Jaylib.BLACK;
import jlImGui.JaylibImGui;
import imgui.ImGui;
public class Main {
public static void main(String[] args) {
Raylib.InitWindow(1600, 800, "Window!"); // Initialization.
Raylib.SetTargetFPS(60);
JaylibImGui.setupImGui(); // Setup ImGui.
while (!Raylib.WindowShouldClose()) {
Raylib.BeginDrawing();
Raylib.ClearBackground(BLACK);
JaylibImGui.process(); // Process keyboard/mouse/etc.
ImGui.newFrame(); // Create new ImGui frame.
ImGui.showDemoWindow(); // Show Demo Window.
ImGui.endFrame(); // End ImGui frame.
JaylibImGui.render(); // Render ImGui & draw data.
Raylib.EndDrawing();
}
JaylibImGui.disposeNDestroy(); // Dispose and destroy ImGui context.
Raylib.CloseWindow();
}
}
- Java version used in jlImGui:
8+
. - lwjgl version used in jlImGui:
3.3.3
. - Raylib version used in JlImGui:
4.5
(can be lower/higher). - imgui-java version used in jlImGui:
1.86.11-all
. - ImGui version used (and supported) in jlImGui:
1.86
. - JlImGui version:
1.2.1
.
jlImGui
into your Java project you have to install latest version of jlImGui
(.zip), unzip folder (jlImGui
) to your project main directory, after unzip imgui-app-1.86.11-all.jar
to your project and add as a dependency in your editor/IDEA/terminal. It's important to add Raylib as a dependency too before running the code.
- No gamepad support:
jlImGui
does not provide gamepad support for ImGui.
MIT
license, it means you can do everything you want with it.
JlImGui V1.2.1