2019-09-22 17:42:51 +02:00
|
|
|
// SPDX-License-Identifier: MIT
|
2022-11-13 07:37:18 +01:00
|
|
|
// SPDX-FileCopyrightText: 2014 Eric Woroshow
|
2018-12-08 18:35:13 +01:00
|
|
|
|
2022-11-13 15:10:20 +01:00
|
|
|
//go:build !android && !darwin && !js && !nintendosdk && !windows && !opengles
|
2018-12-08 18:35:13 +01:00
|
|
|
|
|
|
|
package gl
|
|
|
|
|
2022-11-13 15:10:20 +01:00
|
|
|
// #cgo pkg-config: gl
|
|
|
|
//
|
|
|
|
// #include <stdlib.h>
|
|
|
|
// #include <GL/glx.h>
|
|
|
|
//
|
|
|
|
// static void* getProcAddress(const char* name) {
|
|
|
|
// return glXGetProcAddress((const GLubyte *) name);
|
|
|
|
// }
|
2018-12-08 18:35:13 +01:00
|
|
|
import "C"
|
2022-11-13 05:24:54 +01:00
|
|
|
|
2018-12-08 18:35:13 +01:00
|
|
|
import "unsafe"
|
|
|
|
|
|
|
|
func getProcAddress(namea string) unsafe.Pointer {
|
|
|
|
cname := C.CString(namea)
|
|
|
|
defer C.free(unsafe.Pointer(cname))
|
2022-11-13 14:21:45 +01:00
|
|
|
return C.getProcAddress(cname)
|
2018-12-08 18:35:13 +01:00
|
|
|
}
|