| File | File | |
| | @@ -1,8 +1,9 @@
|
| 1 | 1 | // +build darwin
|
| 2 | 2 |
|
| 3 | 3 | // movingtriangle is an example Metal program that displays a moving triangle in a window.
|
| 4 | // It opens a window and renders a triangle that follows the mouse cursor.
|
| 4 | 5 | package main
|
| 5 | 6 |
|
| 6 | 7 | import (
|
| 7 | 8 | "flag"
|
| 8 | 9 | "fmt"
|
| | @@ -11,12 +12,12 @@ import (
|
| 11 | 12 | "runtime"
|
| 12 | 13 | "time"
|
| 13 | 14 | "unsafe"
|
| 14 | 15 |
|
| 15 | 16 | "dmitri.shuralyov.com/gpu/mtl"
|
| 16 | | "dmitri.shuralyov.com/gpu/mtl/internal/ca"
|
| 17 | | "dmitri.shuralyov.com/gpu/mtl/internal/ns"
|
| 17 | "dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/ca"
|
| 18 | "dmitri.shuralyov.com/gpu/mtl/example/movingtriangle/internal/ns"
|
| 18 | 19 | "github.com/go-gl/glfw/v3.2/glfw"
|
| 19 | 20 | "golang.org/x/image/math/f32"
|
| 20 | 21 | )
|
| 21 | 22 |
|
| 22 | 23 | func init() {
|