Esempio n. 1
0
// Opens the device and prepares it for use. This must be the first call made on the Device.
func (device *Device) Open() int {
	rc := int(C.freenect_open_device(device.freenect.ctx, &device.dev, C.int(device.index)))
	if rc == 0 {
		C.freenect_set_user(device.dev, unsafe.Pointer(device))
	}
	return rc
}
Esempio n. 2
0
//FREENECTAPI int freenect_open_device(freenect_context *ctx, freenect_device **dev, int index);
func (ctx *Context) OpenDevices(index int) (dev *Device, status int) {
	status = int(C.freenect_open_device(ctx.ptr(), (**C.freenect_device)(unsafe.Pointer(&dev)), C.int(index)))
	return dev, status
}