zworld/engine/renderapi/vulkan/init.go

18 lines
238 B
Go
Raw Normal View History

2024-01-14 22:56:06 +08:00
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)
}
}