Support passthrough for stream
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user