[][src]Struct openxr::Session

pub struct Session<G: Graphics> { /* fields omitted */ }

A rendering session using a particular graphics API G

Methods

impl<G: Graphics> Session<G>[src]

pub unsafe fn from_raw(
    instance: Instance,
    handle: Session
) -> (Self, FrameWaiter, FrameStream<G>)
[src]

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.

pub fn as_raw(&self) -> Session[src]

Access the raw session handle

pub fn instance(&self) -> &Instance[src]

Access the Instance self is descended from

pub fn set_name(&mut self, name: &str) -> Result<()>[src]

Set the debug name of this Session, if XR_EXT_debug_utils is loaded

pub fn begin(&self, ty: ViewConfigurationType) -> Result<Result>[src]

Request that the runtime show the application's rendered output to the user

pub fn request_exit(&self) -> Result<()>[src]

Request a transition to SessionState::STOPPING so that end may be called.

pub fn end(&self) -> Result<Result>[src]

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>>
[src]

pub fn enumerate_reference_spaces(&self) -> Result<Vec<ReferenceSpaceType>>[src]

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>
[src]

Creates a Space based on a chosen reference space

pub fn enumerate_swapchain_formats(&self) -> Result<Vec<G::Format>>[src]

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.

pub fn create_swapchain(
    &self,
    info: &SwapchainCreateInfo<G>
) -> Result<Swapchain<G>>
[src]

pub fn locate_views(
    &self,
    view_configuration_type: ViewConfigurationType,
    display_time: Time,
    space: &Space
) -> Result<(ViewStateFlags, Vec<View>)>
[src]

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.

pub fn current_interaction_profile(
    &self,
    top_level_user_path: Path
) -> Result<Path>
[src]

Get the suggested interaction profile in use for a top level user path

May be NULL.

pub fn attach_action_sets(&self, sets: &[&ActionSet]) -> Result<()>[src]

Enable use of action sets with a session

Once attached, action sets become immutable.

pub fn sync_actions(&self, action_sets: &[ActiveActionSet]) -> Result<()>[src]

Designate active input actions and update their states

pub fn input_source_localized_name(
    &self,
    source: Path,
    which_components: InputSourceLocalizedNameFlags
) -> Result<String>
[src]

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>
[src]

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.

Trait Implementations

impl<G: Graphics> Clone for Session<G>[src]

Auto Trait Implementations

impl<G> Send for Session<G> where
    G: Send

impl<G> Sync for Session<G> where
    G: Sync

impl<G> Unpin for Session<G> where
    G: Unpin

impl<G> UnwindSafe for Session<G> where
    G: UnwindSafe

impl<G> RefUnwindSafe for Session<G> where
    G: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]