Prefer FB passthrough over base OpenXR one
This commit is contained in:
@@ -383,11 +383,7 @@ void xr::session::enable_passthrough(xr::system & system)
|
|||||||
if (system.passthrough_supported() == xr::system::passthrough_type::no_passthrough)
|
if (system.passthrough_supported() == xr::system::passthrough_type::no_passthrough)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (utils::contains(system.environment_blend_modes(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO), XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND))
|
if (utils::contains(application::get_xr_extensions(), XR_FB_PASSTHROUGH_EXTENSION_NAME))
|
||||||
{
|
|
||||||
passthrough.emplace<xr::passthrough_alpha_blend>();
|
|
||||||
}
|
|
||||||
else if (utils::contains(application::get_xr_extensions(), XR_FB_PASSTHROUGH_EXTENSION_NAME))
|
|
||||||
{
|
{
|
||||||
passthrough.emplace<xr::passthrough_fb>(*inst, *this);
|
passthrough.emplace<xr::passthrough_fb>(*inst, *this);
|
||||||
}
|
}
|
||||||
@@ -395,6 +391,10 @@ void xr::session::enable_passthrough(xr::system & system)
|
|||||||
{
|
{
|
||||||
passthrough.emplace<xr::passthrough_htc>(*inst, *this);
|
passthrough.emplace<xr::passthrough_htc>(*inst, *this);
|
||||||
}
|
}
|
||||||
|
else if (utils::contains(system.environment_blend_modes(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO), XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND))
|
||||||
|
{
|
||||||
|
passthrough.emplace<xr::passthrough_alpha_blend>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void xr::session::disable_passthrough()
|
void xr::session::disable_passthrough()
|
||||||
|
|||||||
Reference in New Issue
Block a user