internal/glfwwin: remove GetProcAddress

This commit is contained in:
Hajime Hoshi 2022-09-18 18:04:02 +09:00
parent 8d5f5a17d4
commit 78802f18d9

View File

@ -587,20 +587,3 @@ func ExtensionSupported(extension string) (bool, error) {
// Check if extension is in the platform-specific string // Check if extension is in the platform-specific string
return window.context.extensionSupported(extension), nil return window.context.extensionSupported(extension), nil
} }
func GetProcAddress(procname string) (unsafe.Pointer, error) {
if !_glfw.initialized {
return nil, NotInitialized
}
ptr, err := _glfw.contextSlot.get()
if err != nil {
return nil, err
}
window := (*Window)(unsafe.Pointer(ptr))
if window == nil {
return nil, fmt.Errorf("glfwwin: cannot query entry point without a current OpenGL or OpenGL ES context %w", NoCurrentContext)
}
return unsafe.Pointer(window.context.getProcAddress(procname)), nil
}