mirror of
https://github.com/mii443/rust-openvr.git
synced 2025-08-22 16:25:36 +00:00
Update to OpenVR SDK 1.0.8
This commit is contained in:
@ -136,6 +136,7 @@ pub mod compositor_error {
|
||||
pub const SHARED_TEXTURES_NOT_SUPPORTED: CompositorError = CompositorError(sys::EVRCompositorError_EVRCompositorError_VRCompositorError_SharedTexturesNotSupported);
|
||||
pub const INDEX_OUT_OF_RANGE: CompositorError = CompositorError(sys::EVRCompositorError_EVRCompositorError_VRCompositorError_IndexOutOfRange);
|
||||
pub const ALREADY_SUBMITTED: CompositorError = CompositorError(sys::EVRCompositorError_EVRCompositorError_VRCompositorError_AlreadySubmitted);
|
||||
pub const INVALID_BOUNDS: CompositorError = CompositorError(sys::EVRCompositorError_EVRCompositorError_VRCompositorError_InvalidBounds);
|
||||
}
|
||||
|
||||
impl fmt::Debug for CompositorError {
|
||||
@ -168,8 +169,3 @@ impl fmt::Display for CompositorError {
|
||||
f.pad(error::Error::description(self))
|
||||
}
|
||||
}
|
||||
|
||||
pub use sys::VkPhysicalDevice_T;
|
||||
pub use sys::VkDevice_T;
|
||||
pub use sys::VkInstance_T;
|
||||
pub use sys::VkQueue_T;
|
||||
|
@ -13,6 +13,11 @@ mod compositor;
|
||||
|
||||
pub use tracking::*;
|
||||
|
||||
pub use sys::VkPhysicalDevice_T;
|
||||
pub use sys::VkDevice_T;
|
||||
pub use sys::VkInstance_T;
|
||||
pub use sys::VkQueue_T;
|
||||
|
||||
static INITIALIZED: AtomicBool = ATOMIC_BOOL_INIT;
|
||||
|
||||
/// Initialize OpenVR
|
||||
|
@ -152,6 +152,14 @@ impl<'a> System<'a> {
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn vulkan_output_device(&self) -> Option<*mut VkPhysicalDevice_T> {
|
||||
unsafe {
|
||||
let mut device = mem::uninitialized();
|
||||
self.0.GetOutputDevice.unwrap()(&mut device, sys::ETextureType_ETextureType_TextureType_Vulkan);
|
||||
if device == 0 { None } else { Some(device as usize as *mut _) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Values represent the tangents of the half-angles from the center view axis
|
||||
|
Reference in New Issue
Block a user