Exemplo n.º 1
0
func ReleaseTexImage(
	disp Display, surface Surface, buffer int32) bool {
	return goBoolean(C.eglReleaseTexImage(
		C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLSurface(unsafe.Pointer(surface)),
		C.EGLint(buffer)))
}
Exemplo n.º 2
0
func Initialize(
	disp Display, major, minor *int32) bool {
	return goBoolean(C.eglInitialize(
		C.EGLDisplay(unsafe.Pointer(disp)),
		(*C.EGLint)(major),
		(*C.EGLint)(minor)))
}
Exemplo n.º 3
0
func CreateWindowSurface(disp Display, config Config,
	win NativeWindowType, attribList *int32) Surface {
	return Surface(C.eglCreateWindowSurface(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLConfig(unsafe.Pointer(config)),
		C.EGLNativeWindowType(uintptr(win)),
		(*C.EGLint)(attribList)))
}
Exemplo n.º 4
0
func CreatePbufferSurface(
	disp Display, config Config, attribList *int32) Surface {
	return Surface(C.eglCreatePbufferSurface(
		C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLConfig(unsafe.Pointer(config)),
		(*C.EGLint)(attribList)))
}
Exemplo n.º 5
0
func SurfaceAttrib(disp Display, surface Surface,
	attribute int32, value int32) bool {

	return goBoolean(C.eglSurfaceAttrib(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLSurface(unsafe.Pointer(surface)),
		C.EGLint(attribute),
		C.EGLint(value)))
}
Exemplo n.º 6
0
func CreatePixmapSurface(disp Display, config Config,
	pixmap NativePixmapType, attribList *int32) Surface {

	return Surface(C.eglCreatePixmapSurface(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLConfig(config),
		C.EGLNativePixmapType(uintptr(pixmap)),
		(*C.EGLint)(attribList)))
}
Exemplo n.º 7
0
func CreateContext(disp Display, config Config,
	shareContext Context, attribList *int32) Context {

	return Context(C.eglCreateContext(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLConfig(unsafe.Pointer(config)),
		C.EGLContext(unsafe.Pointer(shareContext)),
		(*C.EGLint)(attribList)))
}
Exemplo n.º 8
0
Arquivo: egl.go Projeto: remogatto/egl
func QuerySurface(
	disp Display, surface Surface, attribute int32, value *int32) bool {
	return goBoolean(C.eglQuerySurface(
		C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLSurface(unsafe.Pointer(surface)),
		C.EGLint(attribute),
		(*C.EGLint)(value)))
}
Exemplo n.º 9
0
func CopyBuffers(
	disp Display, surface Surface,
	target NativePixmapType) bool {
	return goBoolean(C.eglCopyBuffers(
		C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLSurface(unsafe.Pointer(surface)),
		C.EGLNativePixmapType(uintptr(target))))
}
Exemplo n.º 10
0
Arquivo: egl.go Projeto: remogatto/egl
func CreateWindowSurface(
	disp Display, config Config,
	win NativeWindowType, attribList *int32) Surface {
	return Surface(C.eglCreateWindowSurface(
		C.EGLDisplay(disp),
		C.EGLConfig(config),
		C.EGLNativeWindowType(win),
		(*C.EGLint)(attribList)))
}
Exemplo n.º 11
0
func MakeCurrent(
	disp Display, draw Surface,
	read Surface, ctx Context) bool {
	return goBoolean(C.eglMakeCurrent(
		C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLSurface(unsafe.Pointer(draw)),
		C.EGLSurface(unsafe.Pointer(read)),
		C.EGLContext(unsafe.Pointer(ctx))))
}
Exemplo n.º 12
0
func ChooseConfig(disp Display, atrribList []int32, configs *Config,
	configSize int32, numConfig *int32) bool {

	return goBoolean(C.eglChooseConfig(C.EGLDisplay(unsafe.Pointer(disp)),
		(*C.EGLint)(&atrribList[0]),
		(*C.EGLConfig)(unsafe.Pointer(configs)),
		C.EGLint(configSize),
		(*C.EGLint)(numConfig)))
}
Exemplo n.º 13
0
func CreatePbufferFromClientBuffer(disp Display, buftype Enum, config Config,
	buffer ClientBuffer, attribList *int32) Surface {

	return Surface(C.eglCreatePbufferFromClientBuffer(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLenum(buftype),
		C.EGLClientBuffer(buffer),
		C.EGLConfig(unsafe.Pointer(config)),
		(*C.EGLint)(attribList)))
}
Exemplo n.º 14
0
func GetConfigAttrib(
	disp Display, config Config,
	attribute int32, value *int32) bool {
	return goBoolean(C.eglGetConfigAttrib(
		C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLConfig(config),
		C.EGLint(attribute),
		(*C.EGLint)(unsafe.Pointer(value))))
}
Exemplo n.º 15
0
func GetConfigs(
	disp Display, configs *Config,
	configSize int32, numConfig *int32) bool {
	return goBoolean(C.eglGetConfigs(
		C.EGLDisplay(unsafe.Pointer(disp)),
		(*C.EGLConfig)(unsafe.Pointer(configs)),
		C.EGLint(configSize),
		(*C.EGLint)(unsafe.Pointer(numConfig))))
}
Exemplo n.º 16
0
func QueryContext(
	disp Display, ctx Context,
	attribute int32, value *int32) bool {
	return goBoolean(C.eglQueryContext(
		C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLContext(unsafe.Pointer(ctx)),
		C.EGLint(attribute),
		(*C.EGLint)(value)))
}
Exemplo n.º 17
0
func DestroyContext(disp Display, ctx Context) bool {
	return goBoolean(C.eglDestroyContext(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLContext(unsafe.Pointer(ctx))))
}
Exemplo n.º 18
0
func SwapInterval(disp Display, interval int32) bool {
	return goBoolean(C.eglSwapInterval(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLint(interval)))
}
Exemplo n.º 19
0
func DestroySurface(disp Display, surface Surface) bool {
	return goBoolean(C.eglDestroySurface(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLSurface(unsafe.Pointer(surface))))
}
Exemplo n.º 20
0
func QueryString(disp Display, name int32) string {
	return C.GoString(
		C.eglQueryString(C.EGLDisplay(unsafe.Pointer(disp)), C.EGLint(name)))
}
Exemplo n.º 21
0
func Terminate(disp Display) bool {
	return goBoolean(C.eglTerminate(
		C.EGLDisplay(unsafe.Pointer(disp))))
}
Exemplo n.º 22
0
func SwapBuffers(disp Display, surface Surface) bool {
	return goBoolean(C.eglSwapBuffers(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLSurface(unsafe.Pointer(surface))))
}