[−][src]Struct openxr::Instance
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]
entry: Entry,
handle: Instance,
exts: InstanceExtensions
) -> Result<Self>
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]
&self,
system: SystemId,
vk_instance: VkInstance
) -> Result<VkPhysicalDevice>
Identify the Vulkan graphics device to use for a system
pub fn graphics_requirements<G: Graphics>(
&self,
system: SystemId
) -> Result<G::Requirements>
[src]
&self,
system: SystemId
) -> Result<G::Requirements>
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]
&self,
system: SystemId,
info: &G::SessionCreateInfo
) -> Result<(Session<G>, FrameWaiter, FrameStream<G>)>
Create a session for a particular graphics API
Returns three separate objects:
Session
exposes most session-related operations and is cheap to cloneFrameWaiter
allows blocking until it is time to begin graphics device work, and cannot be clonedFrameStream
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]
&self,
storage: &'a mut EventDataBuffer
) -> Result<Option<Event<'a>>>
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]
&self,
system: SystemId
) -> Result<Vec<ViewConfigurationType>>
Enumerates the supported view configuration types
pub fn view_configuration_properties(
&self,
system: SystemId,
ty: ViewConfigurationType
) -> Result<ViewConfigurationProperties>
[src]
&self,
system: SystemId,
ty: ViewConfigurationType
) -> Result<ViewConfigurationProperties>
Query properties of an individual view configuration
pub fn enumerate_view_configuration_views(
&self,
system: SystemId,
ty: ViewConfigurationType
) -> Result<Vec<ViewConfigurationView>>
[src]
&self,
system: SystemId,
ty: ViewConfigurationType
) -> Result<Vec<ViewConfigurationView>>
pub fn enumerate_environment_blend_modes(
&self,
system: SystemId,
view_configuration_type: ViewConfigurationType
) -> Result<Vec<EnvironmentBlendMode>>
[src]
&self,
system: SystemId,
view_configuration_type: ViewConfigurationType
) -> Result<Vec<EnvironmentBlendMode>>
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]
&self,
interaction_profile: Path,
bindings: &[Binding]
) -> Result<()>
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]
&self,
name: &str,
localized_name: &str,
priority: u32
) -> Result<ActionSet>
Allocate a new ActionSet
Trait Implementations
Auto Trait Implementations
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnwindSafe for Instance
impl RefUnwindSafe for Instance
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,