mirror of
https://github.com/mii443/rust-openvr.git
synced 2025-08-23 00:35:31 +00:00
fixed lib name 3
This commit is contained in:
@ -16,7 +16,7 @@ fn print_matrix_4x3(offset: u32, mat: [[f32; 4]; 3]) {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let ivr = match vr::IVRSystem::init() {
|
||||
let ivr = match openvr::IVRSystem::init() {
|
||||
Ok(ivr) => ivr,
|
||||
Err(err) => {
|
||||
println!("Failed to create IVR subsystem {:?}", err);
|
||||
@ -27,16 +27,16 @@ fn main() {
|
||||
println!("IVR was created");
|
||||
println!("\tbounds: {:?}", ivr.bounds());
|
||||
println!("\trecommended size: {:?}", ivr.recommended_render_target_size());
|
||||
println!("\teye output: {:?} {:?}", ivr.eye_viewport(vr::Eye::Left), ivr.eye_viewport(vr::Eye::Right));
|
||||
println!("\teye output: {:?} {:?}", ivr.eye_viewport(openvr::Eye::Left), ivr.eye_viewport(openvr::Eye::Right));
|
||||
println!("\tvsync: {:?}", ivr.time_since_last_vsync());
|
||||
|
||||
print!("\tprojection matrix left ");
|
||||
print_matrix_4x4(31, ivr.projection_matrix(vr::Eye::Left, 0.1, 100.));
|
||||
print_matrix_4x4(31, ivr.projection_matrix(openvr::Eye::Left, 0.1, 100.));
|
||||
print!("\tprojection matrix right ");
|
||||
print_matrix_4x4(31, ivr.projection_matrix(vr::Eye::Right, 0.1, 100.));
|
||||
print_matrix_4x4(31, ivr.projection_matrix(openvr::Eye::Right, 0.1, 100.));
|
||||
|
||||
print!("\teye_to_head ");
|
||||
print_matrix_4x3(8+12, ivr.eye_to_head_transform(vr::Eye::Left));
|
||||
print_matrix_4x3(8+12, ivr.eye_to_head_transform(openvr::Eye::Left));
|
||||
|
||||
print!("\tposes ");
|
||||
print_matrix_4x3(8+6, ivr.tracked_devices(0.).as_slice()[0].to_device);
|
||||
@ -45,7 +45,7 @@ fn main() {
|
||||
for u in 0..2 {
|
||||
for v in 0..2 {
|
||||
let pos = ivr.compute_distortion(
|
||||
vr::Eye::Left,
|
||||
openvr::Eye::Left,
|
||||
u as f32 / 4.,
|
||||
v as f32 / 4.,
|
||||
);
|
||||
|
Reference in New Issue
Block a user