triangle-dll

command
v0.0.0-...-45a176d Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Go triangle with dynamically loaded wgpu-native

The Windows amd64 implementation remains in main_windows_amd64.go. On Linux amd64, main_linux_amd64.go dynamically loads libwgpu_native.so and uses Xlib for the window and surface, then renders the WGSL triangle.

Build the debug shared library and run the example from the repository root:

cargo build \
  --manifest-path third_party/wgpu-native/Cargo.toml \
  --target x86_64-unknown-linux-gnu
WGPU_NATIVE_PATH="$PWD/third_party/wgpu-native/target/x86_64-unknown-linux-gnu/debug/libwgpu_native.so" \
  go run ./examples/triangle-dll

The project uses purego to invoke the shared-library and Xlib APIs without cgo. Install an X server and make it accessible through DISPLAY. Close the window to exit.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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