mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
internal/glfwwin: remove GetProcAddress
This commit is contained in:
parent
8d5f5a17d4
commit
78802f18d9
@ -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
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user