Beispiel #1
0
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)))
}
Beispiel #2
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
}