Struct openxr::Instance[][src]

pub struct Instance { /* fields omitted */ }
Expand description

Root object mediating an application’s interaction with OpenXR

Constructed from an Entry.

Implementations

Take ownership of an existing instance handle

Safety

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

Access the entry points used to create self

Access the core function pointers

Access the internal extension function pointers

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

Construct a Path from a string

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

Create a Vulkan instance suitable for use with a particular system

Instance::graphics_requirements::<Vulkan>() must be called first.

Safety

See XR_KHR_vulkan_enable2.

Get a suitable VkPhysicalDevice for use with a particular system

Call Instance::create_vulkan_instance() first to get a suitable VkInstance.

Requires KHR_vulkan_enable2.

Get a suitable VkDevice for use with a particular system

Call Instance::vulkan_graphics_device() first to get a suitable VkPhysicalDevice.

Safety

See XR_KHR_vulkan_enable2.

Query graphics API version requirements

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.

Get the next event, if available

Returns immediately regardless of whether an event was available.

Enumerates the supported view configuration types

Query properties of an individual view configuration

Obtain the current Time

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

Specify default bindings for a well-known input archetype

Allocate a new ActionSet

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.