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

Take ownership of an existing session handle

Safety

handle must be a valid session handle associated with instance.

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(&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 end(&self) -> Result<Result>[src]

Signals that the application no longer wishes to display rendered output, read input state, or control haptic events

pub fn reference_space_bounds_rect(
    &self,
    ty: ReferenceSpaceType
) -> Result<Option<Extent2Df>>
[src]

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

Enumerates 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 are 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,
    display_time: Time,
    space: &Space
) -> Result<(ViewStateFlags, Vec<View>)>
[src]

Returns the view and projection info for a particular display time

pub unsafe fn wait_frame(&self) -> Result<FrameState>[src]

Block until rendering should begin

Safety

Must be externally synchronized, and must not be called on Headless sessions.

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

Indicate that graphics device work is beginning

Safety

Must be externally synchronized with respect to both itself and end_frame.

pub unsafe fn end_frame(
    &self,
    display_time: Time,
    environment_blend_mode: EnvironmentBlendMode,
    layers: &[&CompositionLayerBase<G>]
) -> Result<()>
[src]

Indicate that all graphics work for the frame has been submitted

Safety

Must only be called after a successful call to begin_frame, and be externally synchronized with respect to both itself andbegin_frame`.

pub fn create_action_set(
    &self,
    name: &str,
    localized_name: &str,
    priority: u32
) -> Result<ActionSet>
[src]

Allocate a new ActionSet

pub fn set_interaction_profile_suggested_bindings(
    &self,
    interaction_profile: Path,
    bindings: &[Binding]
) -> Result<()>
[src]

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 sync_action_data(&self, action_sets: &[ActiveActionSet]) -> Result<()>[src]

Designate active input actions and update their states

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

Returns a string for the input source in the current system locale

Trait Implementations

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

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

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

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

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.