Example #1
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 #2
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 #3
0
func (display *Display) QueryString(name int) (string, error) {
	cString := C.eglQueryString(display.eglDisplay, C.EGLint(name))
	if cString == nil {
		return "", getError()
	}
	return C.GoString(cString), nil
}
Example #4
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 #5
0
func (surface *Surface) Query(name Attrib) (Attrib, error) {
	var value Attrib
	success := C.eglQuerySurface(surface.Display.eglDisplay, surface.eglSurface, C.EGLint(name), (*C.EGLint)(&value))
	if success == C.EGL_FALSE {
		return None, getError()
	}

	return value, nil
}
Example #6
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 #7
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 #8
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 #9
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 #10
0
func (display *Display) GetConfigAttrib(config Config, name Attrib) (Attrib, error) {
	var value Attrib
	success := C.eglGetConfigAttrib(display.eglDisplay, C.EGLConfig(config), C.EGLint(name), (*C.EGLint)(&value))
	if success == C.EGL_FALSE {
		return None, getError()
	}

	return value, nil
}
Example #11
0
func GetCurrentSurface(readdraw int32) Surface {
	return Surface(C.eglGetCurrentSurface(C.EGLint(readdraw)))
}
Example #12
0
func SwapInterval(disp Display, interval int32) bool {
	return goBoolean(C.eglSwapInterval(C.EGLDisplay(unsafe.Pointer(disp)),
		C.EGLint(interval)))
}
Example #13
0
func QueryString(disp Display, name int32) string {
	return C.GoString(
		C.eglQueryString(C.EGLDisplay(unsafe.Pointer(disp)), C.EGLint(name)))
}
Example #14
0
func WaitNative(engine int32) bool {
	return goBoolean(C.eglWaitNative(C.EGLint(engine)))
}