[][src]Struct openxr::Instance

pub struct Instance { /* fields omitted */ }

Root object mediating an application's interaction with OpenXR

Constructed from an Entry.

Methods

impl Instance[src]

pub unsafe fn from_raw(
    entry: Entry,
    handle: Instance,
    exts: InstanceExtensions
) -> Result<Self>
[src]

Take ownership of an existing instance handle

Safety

handle must be the instance handle that was used to load exts.

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

pub fn entry(&self) -> &Entry[src]

Access the entry points used to create self

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

Access the core function pointers

pub fn exts(&self) -> &InstanceExtensions[src]

Access the internal extension function pointers

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

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

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

pub fn result_to_string(&self, result: Result) -> Result<String>[src]

pub fn structure_type_to_string(&self, ty: StructureType) -> Result<String>[src]

pub fn system(&self, form_factor: FormFactor) -> Result<SystemId>[src]

pub fn system_properties(&self, system: SystemId) -> Result<SystemProperties>[src]

pub fn string_to_path(&self, string: &str) -> Result<Path>[src]

Construct a Path from a string

A Path should only be used with the instance that produced it.

pub fn path_to_string(&self, path: Path) -> Result<String>[src]

pub fn vulkan_instance_extensions(&self, system: SystemId) -> Result<String>[src]

Identify the Vulkan instance extensions required by a system

Returns a space-delimited list of Vulkan instance extension names.

pub fn vulkan_device_extensions(&self, system: SystemId) -> Result<String>[src]

Identify the Vulkan device extensions required by a system

Returns a space-delimited list of Vulkan device extension names.

pub fn vulkan_graphics_device(
    &self,
    system: SystemId,
    vk_instance: VkInstance
) -> Result<VkPhysicalDevice>
[src]

Identify the Vulkan graphics device to use for a system

pub fn graphics_requirements<G: Graphics>(
    &self,
    system: SystemId
) -> Result<G::Requirements>
[src]

Query graphics API version requirements

pub unsafe fn create_session<G: Graphics>(
    &self,
    system: SystemId,
    info: &G::SessionCreateInfo
) -> Result<(Session<G>, FrameWaiter, FrameStream<G>)>
[src]

Create a session for a particular graphics API

Returns three separate objects:

  • Session exposes most session-related operations and is cheap to clone
  • FrameWaiter allows blocking until it is time to begin graphics device work, and cannot be cloned
  • FrameStream allows callers to mark the beginning of graphics device work and submit completed frames for presentation

These objects are separate to ensure multithreaded pipelined renderers can safely wait for the cue to begin a new frame while a prior frame is still being rendered without additional synchronization.

Safety

The requirements documented by the graphics API extension must be respected. Among other requirements, info must contain valid handles, and certain operations must be externally synchronized.

pub fn poll_event<'a>(
    &self,
    storage: &'a mut EventDataBuffer
) -> Result<Option<Event<'a>>>
[src]

Get the next event, if available

Returns immediately regardless of whether an event was available.

pub fn enumerate_view_configurations(
    &self,
    system: SystemId
) -> Result<Vec<ViewConfigurationType>>
[src]

Enumerates the supported view configuration types

pub fn view_configuration_properties(
    &self,
    system: SystemId,
    ty: ViewConfigurationType
) -> Result<ViewConfigurationProperties>
[src]

Query properties of an individual view configuration

pub fn enumerate_view_configuration_views(
    &self,
    system: SystemId,
    ty: ViewConfigurationType
) -> Result<Vec<ViewConfigurationView>>
[src]

pub fn enumerate_environment_blend_modes(
    &self,
    system: SystemId,
    view_configuration_type: ViewConfigurationType
) -> Result<Vec<EnvironmentBlendMode>>
[src]

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

Obtain the current Time

Requires KHR_convert_timespec_time. Most applications should use times from FrameStream::wait and Action::state instead.

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

Specify default bindings for a well-known input archetype

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

Allocate a new ActionSet

Trait Implementations

impl Clone for Instance[src]

Auto Trait Implementations

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]