jGibbonEngine
A multi-backend 3D engine for the JVM. Write once, render on OpenGL, Vulkan, and WebGPU — desktop and browser.
What's in the engine
Valhalla-Ready Math
Math types are Java records, ready for Project Valhalla value types. Zero-allocation vector math.
Transaction System
Atomic resource creation with automatic cleanup on failure. All GPU resource setup goes through transactions.
Module System
Dependency-aware module lifecycle with topological ordering, fixed/variable timestep, and state machine transitions.
Visual Regression Tests
Screenshot test scenes run on all backends automatically. Cross-backend comparison catches rendering differences.
Compilable Tutorials
Tutorials are real Java files that compile against the engine. Auto-generated into website docs — always up to date.
Entity Components
Scene entities with typed components — Transform, MeshData, MaterialData. Parent-child hierarchy for scene graph organisation.
Resource Management
GpuResourceManager tracks all GPU resources with deferred deletion and leak detection. WeakCache for automatic cleanup.
PBR Materials
Physically-based rendering with albedo, roughness, metallic, and per-texture sampler control. Materials are type-safe property maps.
Render Graph
Declarative render pass orchestration with automatic resource lifetime management and dependency resolution.
Desktop + Web
Same BaseApplication, same scene code — desktop via LWJGL (GLFW + OpenGL/Vulkan), browser via TeaVM + WebGPU.
Slang Shaders
Write shaders once in Slang. The engine compiles them to GLSL, SPIR-V, or WGSL depending on the active backend — including in the browser via WASM.
Debug UI Overlay
Built-in Nuklear-inspired immediate-mode UI with draggable windows, z-ordering, and input focus. Works on OpenGL, Vulkan, and WebGPU.
Inspector Panels
Accordion-style collapsible sections with property grids — label-value pairs, drag-to-edit floats, color pickers, and combo boxes.
Live Charts
Ring-buffer line graphs for real-time data — FPS counters, frame time, or any streaming values with auto-range.
Up and running in 3 steps
Clone and build
git clone https://github.com/zzuegg/jGibbonEngine.git
cd jGibbonEngine
./gradlew build
Create your application
BaseApplication and override init():
public class MyGame extends BaseApplication {
@Override
protected void init() {
camera().lookAt(new Vec3(0, 2, 5), Vec3.ZERO, Vec3.UNIT_Y);
var cube = scene().createEntity();
cube.add(PrimitiveMeshes.cube());
cube.add(MaterialData.unlit(new Vec3(0.2f, 0.6f, 1.0f)));
cube.add(Transform.IDENTITY);
}
}
Configure and launch
var config = EngineConfig.builder()
.windowTitle("My Game")
.platform(DesktopPlatform.builder().build())
.graphicsBackend(OpenGlBackend.factory(new LwjglGlBindings()))
.build();
new MyGame().launch(config);