fixed minor bugs, opengl example is rendering now the lighthouse within the hmd

This commit is contained in:
Rene Eichhorn
2016-05-06 14:39:12 +02:00
parent 5801325a54
commit f085d27003
7 changed files with 169 additions and 19 deletions

View File

@ -13,6 +13,14 @@ pub struct TrackedDevicePose {
}
impl TrackedDevicePose {
// returns the device class of the tracked object
pub fn device_class(&self) -> openvr_sys::Enum_ETrackedDeviceClass {
unsafe {
let system = * { system().unwrap().0 as *mut openvr_sys::Struct_VR_IVRSystem_FnTable};
system.GetTrackedDeviceClass.unwrap()(self.index as u32)
}
}
/// gets a propery as a string
pub fn get_property_string(&self, property: openvr_sys::Enum_ETrackedDeviceProperty) -> Result<String, openvr_sys::Enum_ETrackedPropertyError> {
unsafe {