2022-05-27 11:26:53 +02:00
|
|
|
// SPDX-License-Identifier: MIT
|
2022-11-13 07:37:18 +01:00
|
|
|
// SPDX-FileCopyrightText: 2014 Eric Woroshow
|
2022-05-27 11:26:53 +02:00
|
|
|
|
|
|
|
package gl
|
|
|
|
|
|
|
|
import (
|
2022-06-10 14:59:01 +02:00
|
|
|
"github.com/ebitengine/purego"
|
2022-05-27 11:26:53 +02:00
|
|
|
)
|
|
|
|
|
2022-11-13 11:51:36 +01:00
|
|
|
var opengl uintptr
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
opengl = purego.Dlopen("/System/Library/Frameworks/OpenGLES.framework/Versions/Current/OpenGLES", purego.RTLD_GLOBAL)
|
|
|
|
if opengl != 0 {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
opengl = purego.Dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", purego.RTLD_GLOBAL)
|
|
|
|
}
|
2022-05-27 11:26:53 +02:00
|
|
|
|
|
|
|
func getProcAddress(name string) uintptr {
|
|
|
|
return purego.Dlsym(opengl, name)
|
|
|
|
}
|