Intro
hlg
(High Level Graphics)
This project is a WIP. The goal is to make a high level graphics api for golang primarily using https://github.com/rajveermalviya/go-webgpu.
Examples
check the ./examples
dir for some basic examples
Triangle
1package main
2
3import (
4 "github.com/dfirebaugh/hlg"
5 "golang.org/x/image/colornames"
6)
7
8func main() {
9 hlg.SetWindowSize(720, 480)
10 hlg.SetScreenSize(240, 160)
11 t := hlg.Triangle(0, 160, 120, 0, 240, 160, colornames.Orangered)
12
13 hlg.Update(func() {
14 hlg.Clear(colornames.Skyblue)
15 t.Render()
16 })
17}