示例#1
0
文件: egl.go 项目: 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)))
}
示例#2
0
文件: surface.go 项目: foobaz/egl
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
}