graphicsdriver/opengl: Use NewLazySystemDLL instead of NewLazyDLL (#766)

This commit is contained in:
Hajime Hoshi 2019-01-04 15:05:27 +09:00
parent f2dcc8ccdb
commit 123be16699

View File

@ -3,17 +3,17 @@
package gl package gl
import ( import (
"syscall" "golang.org/x/sys/windows"
"unsafe" "unsafe"
) )
var ( var (
opengl32 = syscall.NewLazyDLL("opengl32") opengl32 = windows.NewLazySystemDLL("opengl32")
wglGetProcAddress = opengl32.NewProc("wglGetProcAddress") wglGetProcAddress = opengl32.NewProc("wglGetProcAddress")
) )
func getProcAddress(namea string) unsafe.Pointer { func getProcAddress(namea string) unsafe.Pointer {
cname, err := syscall.BytePtrFromString(namea) cname, err := windows.BytePtrFromString(namea)
if err != nil { if err != nil {
panic(err) panic(err)
} }