hello-cube

command module
v0.0.0-...-8aa7784 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 3 Imported by: 0

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 .

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL