Make virtual tracker xdevs toggleable

Co-authored-by: Guillaume Meunier <guillaume.meunier@centraliens.net>
This commit is contained in:
Sapphire
2026-07-10 14:52:50 -05:00
co-authored by Guillaume Meunier
parent 727445520e
commit 1cc61fd07a
18 changed files with 268 additions and 67 deletions
+11 -2
View File
@@ -267,6 +267,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
info.settings.bitrate_bps = config.bitrate_bps;
info.settings.mirror_gamepad = config.forward_gamepad;
info.settings.enabled_body_parts = config.body_part_mask;
info.hand_tracking = config.check_feature(feature::hand_tracking);
info.eye_gaze = config.check_feature(feature::eye_gaze);
@@ -307,7 +308,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
info.body_tracking = from_headset::body_type::fb;
break;
case xr::body_tracker_type::meta:
info.body_tracking = config.fb_lower_body ? from_headset::body_type::meta : from_headset::body_type::fb;
info.body_tracking = from_headset::body_type::meta;
break;
case xr::body_tracker_type::pico:
info.body_tracking = from_headset::body_type::bd;
@@ -502,17 +503,25 @@ void scenes::stream::on_focused()
session,
device,
swapchain_format,
1800,
3600,
1200);
std::vector<imgui_context::viewport> vps{
{
// Main window
.space = xr::spaces::world,
// Position and orientation are set at each frame
.size = {1.2, 0.6666},
.vp_origin = {0, 0},
.vp_size = {1800, 1000},
},
{
// Popup window
.space = xr::spaces::world,
.size = {1.2, 0.6666},
.vp_origin = {1800, 0},
.vp_size = {1800, 1000},
},
{
.space = xr::spaces::world,
.size = {1.2, 0.1333},