Documentation
¶
Overview ¶
Command hello-cube renders a lit, rotating cube using g3d + gogpu.
This is the "hello world" of g3d -- a minimal example that demonstrates:
- Scene graph setup (scene, mesh, lights, camera)
- PBR material with functional options
- Forward renderer with depth testing
- dt-based animation (smooth on any refresh rate)
- Window resize handling (aspect ratio + depth buffer)
- Proper GPU resource lifecycle (defer Release)
Run with different backends:
GOGPU_GRAPHICS_API=vulkan go run . GOGPU_GRAPHICS_API=dx12 go run . GOGPU_GRAPHICS_API=gles go run . GOGPU_GRAPHICS_API=software go run .
Click to show internal directories.
Click to hide internal directories.