func GetCurrentSurface(readdraw int32) Surface {
	creaddraw, _ := (C.EGLint)(readdraw), cgoAllocsUnknown
	__ret := C.eglGetCurrentSurface(creaddraw)
	__v := (Surface)(__ret)
	return __v
}
GetCurrentSurface function as declared in https://www.khronos.org/registry/egl/sdk/docs/man/html/eglGetCurrentSurface.xhtml
package egl
import "C"
import "unsafe"
func GetError() int32 {
	__ret := C.eglGetError()
	__v := (int32)(__ret)
	return __v
}
func GetDisplay(displayId NativeDisplayType) Display {
	cdisplayId, _ := (C.EGLNativeDisplayType)(displayId), cgoAllocsUnknown
	__ret := C.eglGetDisplay(cdisplayId)
	__v := (Display)(__ret)
	return __v
}
func Initialize(dpy Display, major *int32, minor *int32) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cmajor, _ := (*C.EGLint)(unsafe.Pointer(major)), cgoAllocsUnknown
	cminor, _ := (*C.EGLint)(unsafe.Pointer(minor)), cgoAllocsUnknown
	__ret := C.eglInitialize(cdpy, cmajor, cminor)
	__v := (Boolean)(__ret)
	return __v
}
func Terminate(dpy Display) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	__ret := C.eglTerminate(cdpy)
	__v := (Boolean)(__ret)
	return __v
}
func QueryString(dpy Display, name int32) string {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cname, _ := (C.EGLint)(name), cgoAllocsUnknown
	__ret := C.eglQueryString(cdpy, cname)
	__v := packPCharString(__ret)
	return __v
}
func GetConfigs(dpy Display, configs []Config, configSize int32, numConfig *int32) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cconfigs, _ := (*C.EGLConfig)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&configs)).Data)), cgoAllocsUnknown
	cconfigSize, _ := (C.EGLint)(configSize), cgoAllocsUnknown
	cnumConfig, _ := (*C.EGLint)(unsafe.Pointer(numConfig)), cgoAllocsUnknown
	__ret := C.eglGetConfigs(cdpy, cconfigs, cconfigSize, cnumConfig)
	__v := (Boolean)(__ret)
	return __v
}
func ChooseConfig(dpy Display, attribList []int32, configs []Config, configSize int32, numConfig *int32) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cattribList, _ := (*C.EGLint)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&attribList)).Data)), cgoAllocsUnknown
	cconfigs, _ := (*C.EGLConfig)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&configs)).Data)), cgoAllocsUnknown
	cconfigSize, _ := (C.EGLint)(configSize), cgoAllocsUnknown
	cnumConfig, _ := (*C.EGLint)(unsafe.Pointer(numConfig)), cgoAllocsUnknown
	__ret := C.eglChooseConfig(cdpy, cattribList, cconfigs, cconfigSize, cnumConfig)
	__v := (Boolean)(__ret)
	return __v
}
func GetConfigAttrib(dpy Display, config Config, attribute int32, value *int32) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cconfig, _ := (C.EGLConfig)(config), cgoAllocsUnknown
	cattribute, _ := (C.EGLint)(attribute), cgoAllocsUnknown
	cvalue, _ := (*C.EGLint)(unsafe.Pointer(value)), cgoAllocsUnknown
	__ret := C.eglGetConfigAttrib(cdpy, cconfig, cattribute, cvalue)
	__v := (Boolean)(__ret)
	return __v
}
func CreateWindowSurface(dpy Display, config Config, win NativeWindowType, attribList []int32) Surface {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cconfig, _ := (C.EGLConfig)(config), cgoAllocsUnknown
	cwin, _ := *(*C.EGLNativeWindowType)(unsafe.Pointer(&win)), cgoAllocsUnknown
	cattribList, _ := (*C.EGLint)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&attribList)).Data)), cgoAllocsUnknown
	__ret := C.eglCreateWindowSurface(cdpy, cconfig, cwin, cattribList)
	__v := (Surface)(__ret)
	return __v
}
func CreatePbufferSurface(dpy Display, config Config, attribList []int32) Surface {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cconfig, _ := (C.EGLConfig)(config), cgoAllocsUnknown
	cattribList, _ := (*C.EGLint)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&attribList)).Data)), cgoAllocsUnknown
	__ret := C.eglCreatePbufferSurface(cdpy, cconfig, cattribList)
	__v := (Surface)(__ret)
	return __v
}
func CreatePixmapSurface(dpy Display, config Config, pixmap NativePixmapType, attribList []int32) Surface {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cconfig, _ := (C.EGLConfig)(config), cgoAllocsUnknown
	cpixmap, _ := *(*C.EGLNativePixmapType)(unsafe.Pointer(&pixmap)), cgoAllocsUnknown
	cattribList, _ := (*C.EGLint)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&attribList)).Data)), cgoAllocsUnknown
	__ret := C.eglCreatePixmapSurface(cdpy, cconfig, cpixmap, cattribList)
	__v := (Surface)(__ret)
	return __v
}
func DestroySurface(dpy Display, surface Surface) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	csurface, _ := (C.EGLSurface)(surface), cgoAllocsUnknown
	__ret := C.eglDestroySurface(cdpy, csurface)
	__v := (Boolean)(__ret)
	return __v
}
func QuerySurface(dpy Display, surface Surface, attribute int32, value *int32) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	csurface, _ := (C.EGLSurface)(surface), cgoAllocsUnknown
	cattribute, _ := (C.EGLint)(attribute), cgoAllocsUnknown
	cvalue, _ := (*C.EGLint)(unsafe.Pointer(value)), cgoAllocsUnknown
	__ret := C.eglQuerySurface(cdpy, csurface, cattribute, cvalue)
	__v := (Boolean)(__ret)
	return __v
}
func BindAPI(api Enum) Boolean {
	capi, _ := (C.EGLenum)(api), cgoAllocsUnknown
	__ret := C.eglBindAPI(capi)
	__v := (Boolean)(__ret)
	return __v
}
func QueryAPI() Enum {
	__ret := C.eglQueryAPI()
	__v := (Enum)(__ret)
	return __v
}
func WaitClient() Boolean {
	__ret := C.eglWaitClient()
	__v := (Boolean)(__ret)
	return __v
}
func ReleaseThread() Boolean {
	__ret := C.eglReleaseThread()
	__v := (Boolean)(__ret)
	return __v
}
func CreatePbufferFromClientBuffer(dpy Display, buftype Enum, buffer ClientBuffer, config Config, attribList []int32) Surface {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cbuftype, _ := (C.EGLenum)(buftype), cgoAllocsUnknown
	cbuffer, _ := (C.EGLClientBuffer)(buffer), cgoAllocsUnknown
	cconfig, _ := (C.EGLConfig)(config), cgoAllocsUnknown
	cattribList, _ := (*C.EGLint)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&attribList)).Data)), cgoAllocsUnknown
	__ret := C.eglCreatePbufferFromClientBuffer(cdpy, cbuftype, cbuffer, cconfig, cattribList)
	__v := (Surface)(__ret)
	return __v
}
func SurfaceAttrib(dpy Display, surface Surface, attribute int32, value int32) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	csurface, _ := (C.EGLSurface)(surface), cgoAllocsUnknown
	cattribute, _ := (C.EGLint)(attribute), cgoAllocsUnknown
	cvalue, _ := (C.EGLint)(value), cgoAllocsUnknown
	__ret := C.eglSurfaceAttrib(cdpy, csurface, cattribute, cvalue)
	__v := (Boolean)(__ret)
	return __v
}
func BindTexImage(dpy Display, surface Surface, buffer int32) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	csurface, _ := (C.EGLSurface)(surface), cgoAllocsUnknown
	cbuffer, _ := (C.EGLint)(buffer), cgoAllocsUnknown
	__ret := C.eglBindTexImage(cdpy, csurface, cbuffer)
	__v := (Boolean)(__ret)
	return __v
}
func ReleaseTexImage(dpy Display, surface Surface, buffer int32) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	csurface, _ := (C.EGLSurface)(surface), cgoAllocsUnknown
	cbuffer, _ := (C.EGLint)(buffer), cgoAllocsUnknown
	__ret := C.eglReleaseTexImage(cdpy, csurface, cbuffer)
	__v := (Boolean)(__ret)
	return __v
}
func SwapInterval(dpy Display, interval int32) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cinterval, _ := (C.EGLint)(interval), cgoAllocsUnknown
	__ret := C.eglSwapInterval(cdpy, cinterval)
	__v := (Boolean)(__ret)
	return __v
}
func CreateContext(dpy Display, config Config, shareContext Context, attribList []int32) Context {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cconfig, _ := (C.EGLConfig)(config), cgoAllocsUnknown
	cshareContext, _ := (C.EGLContext)(shareContext), cgoAllocsUnknown
	cattribList, _ := (*C.EGLint)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&attribList)).Data)), cgoAllocsUnknown
	__ret := C.eglCreateContext(cdpy, cconfig, cshareContext, cattribList)
	__v := (Context)(__ret)
	return __v
}
func DestroyContext(dpy Display, ctx Context) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cctx, _ := (C.EGLContext)(ctx), cgoAllocsUnknown
	__ret := C.eglDestroyContext(cdpy, cctx)
	__v := (Boolean)(__ret)
	return __v
}
func MakeCurrent(dpy Display, draw Surface, read Surface, ctx Context) Boolean {
	cdpy, _ := (C.EGLDisplay)(dpy), cgoAllocsUnknown
	cdraw, _ := (C.EGLSurface)(draw), cgoAllocsUnknown
	cread, _ := (C.EGLSurface)(read), cgoAllocsUnknown
	cctx, _ := (C.EGLContext)(ctx), cgoAllocsUnknown
	__ret := C.eglMakeCurrent(cdpy, cdraw, cread, cctx)
	__v := (Boolean)(__ret)
	return __v
}
func GetCurrentContext() Context {
	__ret := C.eglGetCurrentContext()
	__v := (Context)(__ret)
	return __v
}