zworld/engine/renderapi/vulkan/init.go
2024-01-14 22:56:06 +08:00

18 lines
238 B
Go

package vulkan
import (
"runtime"
"github.com/go-gl/glfw/v3.3/glfw"
)
func init() {
// glfw event handling must run on the main OS thread
runtime.LockOSThread()
// init glfw
if err := glfw.Init(); err != nil {
panic(err)
}
}