Struct openxr::Session [−][src]
pub struct Session<G> { /* fields omitted */ }
Expand description
A rendering session using a particular graphics API G
Convertible into an API-agnostic session using Session::into_any_graphics
.
Implementations
Set the debug name of this Session
, if XR_EXT_debug_utils
is loaded
Request that the runtime show the application’s rendered output to the user
pub fn begin_with_secondary(
&self,
ty: ViewConfigurationType,
secondary: &[ViewConfigurationType]
) -> Result<Result>
pub fn begin_with_secondary(
&self,
ty: ViewConfigurationType,
secondary: &[ViewConfigurationType]
) -> Result<Result>
Request that the runtime show the application’s rendered output to the user,
if XR_MSFT_secondary_view_configuration
is loaded
Request a transition to SessionState::STOPPING
so that end
may be called.
Terminate a session in the SessionState::STOPPING
state
See request_exit
for active sessions.
pub fn reference_space_bounds_rect(
&self,
ty: ReferenceSpaceType
) -> Result<Option<Extent2Df>>
Enumerate the set of reference space types supported for this session
Constant for the lifetime of the session.
pub fn create_reference_space(
&self,
reference_space_type: ReferenceSpaceType,
pose_in_reference_space: Posef
) -> Result<Space>
pub fn create_reference_space(
&self,
reference_space_type: ReferenceSpaceType,
pose_in_reference_space: Posef
) -> Result<Space>
Creates a Space
based on a chosen reference space
pub fn locate_views(
&self,
view_configuration_type: ViewConfigurationType,
display_time: Time,
space: &Space
) -> Result<(ViewStateFlags, Vec<View>)>
pub fn locate_views(
&self,
view_configuration_type: ViewConfigurationType,
display_time: Time,
space: &Space
) -> Result<(ViewStateFlags, Vec<View>)>
Get the view and projection info for a particular display time
When rendering, this should be called as late as possible before the GPU accesses it to provide the most accurate possible poses.
Get the suggested interaction profile in use for a top level user path
May be NULL.
Enable use of action sets with a session
Once attached, action sets become immutable.
Designate active input actions and update their states
pub fn input_source_localized_name(
&self,
source: Path,
which_components: InputSourceLocalizedNameFlags
) -> Result<String>
pub fn input_source_localized_name(
&self,
source: Path,
which_components: InputSourceLocalizedNameFlags
) -> Result<String>
Get a name for the input source in the current system locale
pub fn get_visibility_mask_khr(
&self,
view_configuration_type: ViewConfigurationType,
view_index: u32,
visibility_mask_type: VisibilityMaskTypeKHR
) -> Result<VisibilityMask>
pub fn get_visibility_mask_khr(
&self,
view_configuration_type: ViewConfigurationType,
view_index: u32,
visibility_mask_type: VisibilityMaskTypeKHR
) -> Result<VisibilityMask>
Get a mesh describing the visible area of a view
Requires KHR_visibility_mask. Useful to skip shading fragments the user can’t see.
See also the VisibilityMaskChangedKHR
event.
Create a hand tracker
Requires XR_EXT_hand_tracking
Enumerate the list of supported color spaces for [set_color_space
]
Requires XR_FB_color_space
Specify the color space used in the final rendered frame
Requires XR_FB_color_space
Convert into a graphics API agnostic session
Useful for applications which support multiple graphics APIs, but don’t want G
parameters
everywhere.
pub unsafe fn from_raw(
instance: Instance,
handle: Session
) -> (Self, FrameWaiter, FrameStream<G>)
pub unsafe fn from_raw(
instance: Instance,
handle: Session
) -> (Self, FrameWaiter, FrameStream<G>)
Take ownership of an existing session handle
Safety
handle
must be a valid session handle associated with instance
which is not currently
inside a frame and was created for graphics API G
.
Enumerate texture formats supported by the current session
The type of formats returned is dependent on the graphics API for which the session was created.
Trait Implementations
Auto Trait Implementations
impl<G> RefUnwindSafe for Session<G> where
G: RefUnwindSafe,
impl<G> UnwindSafe for Session<G> where
G: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more