mirror of
https://github.com/mii443/rust-openvr.git
synced 2025-08-22 16:25:36 +00:00
d20c4de1c56fae56015ca64bee4c1d56e4511c00
For OpenVR needs to be both initialized before Vulkan is, and shut down before Vulkan is.
rust-openvr
rust-openvr is a binding for openvr.
Link to the documentation
Current sdk version: OpenVR SDK 1.0.1
Using rust-openvr
Requirements
openvr-sys needs cmake and a C++ compiler so that it can compile and statically link the OpenVR client library.
Building on Windows
Rust provides 2 pre-compiled version for windows. MSVC ABI and GNU ABI. The proprietary OpenVR library which is loaded behind the scenes by the client library is MSVC only, and therefore MSVC is required! For more informations about the ABI in Rust see https://www.rust-lang.org/en-US/downloads.html#win-foot
Initializing
extern crate openvr;
fn main() {
// Initialize OpenVR
let context = openvr::init(openvr::ApplicationType::Scene).unwrap();
// accessing subsystems
let system = context.system().unwrap();
// ..
}
Examples
For data collection examples/test.rs can be used. For an actual opengl implementation see examples/opengl.rs (WIP)
Description
Languages
Rust
100%