Example #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)))
}
Example #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)))
}
Example #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)))
}
Example #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)))
}
Example #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)))
}
Example #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)))
}
Example #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)))
}
Example #8
0
File: egl.go Project: 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)))
}
Example #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))))
}
Example #10
0
File: egl.go Project: 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)))
}
Example #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))))
}
Example #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)))
}
Example #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)))
}
Example #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))))
}
Example #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))))
}
Example #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)))
}
Example #17
0
func DestroyContext(disp Display, ctx Context) bool {
	return goBoolean(C.eglDestroyContext(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLContext(unsafe.Pointer(ctx))))
}
Example #18
0
func SwapInterval(disp Display, interval int32) bool {
	return goBoolean(C.eglSwapInterval(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLint(interval)))
}
Example #19
0
func DestroySurface(disp Display, surface Surface) bool {
	return goBoolean(C.eglDestroySurface(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLSurface(unsafe.Pointer(surface))))
}
Example #20
0
func QueryString(disp Display, name int32) string {
	return C.GoString(
		C.eglQueryString(C.EGLDisplay(unsafe.Pointer(disp)), C.EGLint(name)))
}
Example #21
0
func Terminate(disp Display) bool {
	return goBoolean(C.eglTerminate(
		C.EGLDisplay(unsafe.Pointer(disp))))
}
Example #22
0
func SwapBuffers(disp Display, surface Surface) bool {
	return goBoolean(C.eglSwapBuffers(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLSurface(unsafe.Pointer(surface))))
}