Framebuffer library for golang
package main
import (
"github.com/rostislavjadavan/gofb"
)
func main() {
// Create Window
w := gofb.NewWindow("go-fb", 600, 600, false)
// Create pixel buffer
surface := gofb.NewSurface(600, 600)
// Draw pixel into buffer
surface.SetPixel(300, 300, gofb.NewColor3(255, 255, 255))
for w.IsRunning() {
w.StartFrame()
w.Clear(gofb.ColorBlack)
// Draw buffer on the screen
surface.Draw(0, 0)
w.FinalizeFrame()
}
defer surface.Release()
defer w.Destroy()
}
- draw pixel by pixel
- load
png
,jpg
images - scale to mimic pixel art
- use custom
ttf
font - sprite sheets (for tile set rendering)
- keyboard and mouse input
Take a look at all the examples in the /examples folder.