2019-01-17 13:27:58 +01:00
|
|
|
// Code generated by glow (https://github.com/hajimehoshi/glow's for_ebiten branch). DO NOT EDIT.
|
2018-12-08 18:35:13 +01:00
|
|
|
|
|
|
|
package gl
|
|
|
|
|
|
|
|
import (
|
2019-01-04 07:05:27 +01:00
|
|
|
"golang.org/x/sys/windows"
|
2018-12-08 18:35:13 +01:00
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2019-01-04 07:05:27 +01:00
|
|
|
opengl32 = windows.NewLazySystemDLL("opengl32")
|
2018-12-08 18:35:13 +01:00
|
|
|
wglGetProcAddress = opengl32.NewProc("wglGetProcAddress")
|
|
|
|
)
|
|
|
|
|
|
|
|
func getProcAddress(namea string) unsafe.Pointer {
|
2019-01-04 07:05:27 +01:00
|
|
|
cname, err := windows.BytePtrFromString(namea)
|
2018-12-08 18:35:13 +01:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
if r, _, _ := wglGetProcAddress.Call(uintptr(unsafe.Pointer(cname))); r != 0 {
|
|
|
|
return unsafe.Pointer(r)
|
|
|
|
}
|
|
|
|
p := opengl32.NewProc(namea)
|
|
|
|
if err := p.Find(); err != nil {
|
|
|
|
// The proc is not found.
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(p.Addr())
|
|
|
|
}
|