Example #1
0
File: ovr.go Project: krux02/libovr
func (hmd *Hmd) SetFloatArray(propertyName string, values []float32) bool {
	arraySize := C.uint(len(values))
	_values := (*C.float)(&values[0])
	_propertyName := C.CString(propertyName)
	defer C.free(unsafe.Pointer(_propertyName))
	return 0 != C.ovrHmd_SetFloatArray(hmd.cptr(), _propertyName, _values, arraySize)
}
Example #2
0
File: ovr.go Project: postfix/ovr
func (hmd *Hmd) SetFloatArray(propertyName string, values []float32, arraySize uint) bool {
	_propertyName := C.CString(propertyName)
	defer C.free(unsafe.Pointer(_propertyName))
	_values := C.float(values[0])
	return C.ovrHmd_SetFloatArray(hmd.hmdRef, _propertyName, &_values, C.uint(arraySize)) == 1
}