Support passthrough for stream

This commit is contained in:
Patrick Nicolas
2024-11-06 19:50:44 +01:00
parent 45412e3389
commit 410b112fcf
34 changed files with 571 additions and 260 deletions
+6 -1
View File
@@ -21,8 +21,8 @@
#include "application.h"
#include "details/enumerate.h"
#include "xr/instance.h"
#include "utils/contains.h"
#include "xr/instance.h"
#include "xr/system.h"
#include <ranges>
#include <vulkan/vulkan.h>
@@ -347,6 +347,9 @@ void xr::session::sync_actions(XrActionSet action_set, const std::string & subac
void xr::session::enable_passthrough(xr::system & system)
{
if (not std::holds_alternative<std::monostate>(passthrough))
return;
if (system.passthrough_supported() == xr::system::passthrough_type::no_passthrough)
return;
@@ -366,5 +369,7 @@ void xr::session::enable_passthrough(xr::system & system)
void xr::session::disable_passthrough()
{
if (std::holds_alternative<std::monostate>(passthrough))
return;
passthrough.emplace<std::monostate>();
}