Skip to content

rajveermalviya/go-webgpu-examples

Repository files navigation

go-webgpu-examples

go-webgpu is Go bindings for wgpu-native, a cross-platform, safe, graphics api. It runs natively on Vulkan, Metal, D3D12.

Examples

go run github.com/rajveermalviya/go-webgpu-examples/compute@latest

Creates ./image.png with all pixels red and size 100x200

go run github.com/rajveermalviya/go-webgpu-examples/capture@latest

This example uses go-glfw so it will use cgo on all platforms, you will also need some libraries installed to run the example.

go run github.com/rajveermalviya/go-webgpu-examples/triangle@latest

# same example but with 4x MSAA
go run github.com/rajveermalviya/go-webgpu-examples/triangle-msaa@latest

This example also uses go-glfw.

go run github.com/rajveermalviya/go-webgpu-examples/cube@latest

This example also uses go-glfw.

go run github.com/rajveermalviya/go-webgpu-examples/boids@latest

This example uses gamen for windowing, it doesn't use cgo on windows. On linux you may need to install some packages.

go run github.com/rajveermalviya/go-webgpu-examples/gamen-windowing@latest

This example also supports running on android.

# install android sdk
# connect your device and setup adb / run android emulator

# install tsukuru to build apk
go install github.com/rajveermalviya/tsukuru/cmd/tsukuru@latest

cd examples/gamen-windowing
tsukuru run apk .

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages