Class METAEnvironmentDepth
This extension allows the application to request depth maps of the real-world environment around the headset. The depth maps are generated by the runtime and shared with the application using an XrEnvironmentDepthSwapchainMETA.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intExtendsXrResult.static final StringThe extension name.static final intThe extension specification version.static final intExtendsXrObjectType.static final intExtendsXrObjectType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrAcquireEnvironmentDepthImageMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, long acquireInfo, long environmentDepthImage) Unsafe version of:AcquireEnvironmentDepthImageMETAstatic intnxrCreateEnvironmentDepthProviderMETA(XrSession session, long createInfo, long environmentDepthProvider) Unsafe version of:CreateEnvironmentDepthProviderMETAstatic intnxrCreateEnvironmentDepthSwapchainMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, long createInfo, long swapchain) Unsafe version of:CreateEnvironmentDepthSwapchainMETAstatic intnxrEnumerateEnvironmentDepthSwapchainImagesMETA(XrEnvironmentDepthSwapchainMETA swapchain, int imageCapacityInput, long imageCountOutput, long images) Unsafe version of:EnumerateEnvironmentDepthSwapchainImagesMETAstatic intnxrGetEnvironmentDepthSwapchainStateMETA(XrEnvironmentDepthSwapchainMETA swapchain, long state) Unsafe version of:GetEnvironmentDepthSwapchainStateMETAstatic intnxrSetEnvironmentDepthHandRemovalMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, long setInfo) Unsafe version of:SetEnvironmentDepthHandRemovalMETAstatic intxrAcquireEnvironmentDepthImageMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, XrEnvironmentDepthImageAcquireInfoMETA acquireInfo, XrEnvironmentDepthImageMETA environmentDepthImage) Returns an image index in a readable depth swapchain and associated metadata.static intxrCreateEnvironmentDepthProviderMETA(XrSession session, XrEnvironmentDepthProviderCreateInfoMETA createInfo, org.lwjgl.PointerBuffer environmentDepthProvider) Creates and initializes a depth provider.static intxrCreateEnvironmentDepthSwapchainMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, XrEnvironmentDepthSwapchainCreateInfoMETA createInfo, org.lwjgl.PointerBuffer swapchain) Returns a readable depth swapchain.static intxrDestroyEnvironmentDepthProviderMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider) Destroys the depth provider and frees all memory and resources.static intDestroys a readable depth swapchain.static intxrEnumerateEnvironmentDepthSwapchainImagesMETA(XrEnvironmentDepthSwapchainMETA swapchain, IntBuffer imageCountOutput, @Nullable XrSwapchainImageBaseHeader.Buffer images) Gets images from a readable depth swapchain.static intxrGetEnvironmentDepthSwapchainStateMETA(XrEnvironmentDepthSwapchainMETA swapchain, XrEnvironmentDepthSwapchainStateMETA state) Returns the state of the readable depth swapchain.static intxrSetEnvironmentDepthHandRemovalMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, XrEnvironmentDepthHandRemovalSetInfoMETA setInfo) Enables/disables hand removal from the depth map.static intxrStartEnvironmentDepthProviderMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider) Starts the generation of depth maps.static intxrStopEnvironmentDepthProviderMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider) Stops the depth feature.
-
Field Details
-
XR_META_environment_depth_SPEC_VERSION
public static final int XR_META_environment_depth_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_META_ENVIRONMENT_DEPTH_EXTENSION_NAME
The extension name.- See Also:
-
XR_OBJECT_TYPE_ENVIRONMENT_DEPTH_PROVIDER_META
public static final int XR_OBJECT_TYPE_ENVIRONMENT_DEPTH_PROVIDER_METAExtendsXrObjectType.Enum values:
- See Also:
-
XR_OBJECT_TYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_META
public static final int XR_OBJECT_TYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_METAExtendsXrObjectType.Enum values:
- See Also:
-
XR_TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_META
public static final int XR_TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_METAExtendsXrStructureType.Enum values:
TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_METATYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_METATYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_METATYPE_ENVIRONMENT_DEPTH_IMAGE_METATYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_METATYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_META
- See Also:
-
XR_TYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_META
public static final int XR_TYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_METAExtendsXrStructureType.Enum values:
TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_METATYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_METATYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_METATYPE_ENVIRONMENT_DEPTH_IMAGE_METATYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_METATYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_META
- See Also:
-
XR_TYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_META
public static final int XR_TYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_METAExtendsXrStructureType.Enum values:
TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_METATYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_METATYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_METATYPE_ENVIRONMENT_DEPTH_IMAGE_METATYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_METATYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_META
- See Also:
-
XR_TYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_META
public static final int XR_TYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_METAExtendsXrStructureType.Enum values:
TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_METATYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_METATYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_METATYPE_ENVIRONMENT_DEPTH_IMAGE_METATYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_METATYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_META
- See Also:
-
XR_TYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_META
public static final int XR_TYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_METAExtendsXrStructureType.Enum values:
TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_METATYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_METATYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_METATYPE_ENVIRONMENT_DEPTH_IMAGE_METATYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_METATYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_META
- See Also:
-
XR_TYPE_ENVIRONMENT_DEPTH_IMAGE_META
public static final int XR_TYPE_ENVIRONMENT_DEPTH_IMAGE_METAExtendsXrStructureType.Enum values:
TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_METATYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_METATYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_METATYPE_ENVIRONMENT_DEPTH_IMAGE_METATYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_METATYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_META
- See Also:
-
XR_TYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_META
public static final int XR_TYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_METAExtendsXrStructureType.Enum values:
TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_METATYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_METATYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_METATYPE_ENVIRONMENT_DEPTH_IMAGE_METATYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_METATYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_META
- See Also:
-
XR_TYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_META
public static final int XR_TYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_METAExtendsXrStructureType.Enum values:
TYPE_ENVIRONMENT_DEPTH_PROVIDER_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_CREATE_INFO_METATYPE_ENVIRONMENT_DEPTH_SWAPCHAIN_STATE_METATYPE_ENVIRONMENT_DEPTH_IMAGE_ACQUIRE_INFO_METATYPE_ENVIRONMENT_DEPTH_IMAGE_VIEW_METATYPE_ENVIRONMENT_DEPTH_IMAGE_METATYPE_ENVIRONMENT_DEPTH_HAND_REMOVAL_SET_INFO_METATYPE_SYSTEM_ENVIRONMENT_DEPTH_PROPERTIES_META
- See Also:
-
XR_ENVIRONMENT_DEPTH_NOT_AVAILABLE_META
public static final int XR_ENVIRONMENT_DEPTH_NOT_AVAILABLE_METAExtendsXrResult.- See Also:
-
-
Method Details
-
nxrCreateEnvironmentDepthProviderMETA
public static int nxrCreateEnvironmentDepthProviderMETA(XrSession session, long createInfo, long environmentDepthProvider) Unsafe version of:CreateEnvironmentDepthProviderMETA -
xrCreateEnvironmentDepthProviderMETA
public static int xrCreateEnvironmentDepthProviderMETA(XrSession session, XrEnvironmentDepthProviderCreateInfoMETA createInfo, org.lwjgl.PointerBuffer environmentDepthProvider) Creates and initializes a depth provider.C Specification
The
CreateEnvironmentDepthProviderMETAfunction is defined as:XrResult xrCreateEnvironmentDepthProviderMETA( XrSession session, const XrEnvironmentDepthProviderCreateInfoMETA* createInfo, XrEnvironmentDepthProviderMETA* environmentDepthProvider);Description
The
CreateEnvironmentDepthProviderMETAfunction creates a depth provider instance.Creating the depth provider may allocate resources, but should not incur any per-frame compute costs until the provider has been started.
- Runtimes must create the provider in a stopped state.
- Runtimes may limit the number of depth providers per
XrInstance. IfCreateEnvironmentDepthProviderMETAfails due to reaching this limit, the runtime must returnERROR_LIMIT_REACHED. - Runtimes must support at least 1 provider per
XrInstance. - Runtimes may return
ERROR_NOT_PERMITTED_PASSTHROUGH_FBif the app permissions have not been granted to the calling app. - Applications can call
StartEnvironmentDepthProviderMETAto start the generation of depth maps.
Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingCreateEnvironmentDepthProviderMETA sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrEnvironmentDepthProviderCreateInfoMETAstructureenvironmentDepthProvidermust be a pointer to anXrEnvironmentDepthProviderMETAhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSession.createInfo- a pointer to anXrEnvironmentDepthProviderCreateInfoMETAcontaining creation options for the depth provider.environmentDepthProvider- the returnedXrEnvironmentDepthProviderMETAhandle for the created depth provider.
-
xrDestroyEnvironmentDepthProviderMETA
public static int xrDestroyEnvironmentDepthProviderMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider) Destroys the depth provider and frees all memory and resources.C Specification
The
DestroyEnvironmentDepthProviderMETAfunction is defined as:XrResult xrDestroyEnvironmentDepthProviderMETA( XrEnvironmentDepthProviderMETA environmentDepthProvider);Description
The
DestroyEnvironmentDepthProviderMETAfunction destroys the depth provider. After this call the runtime may free all related memory and resources.Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingDestroyEnvironmentDepthProviderMETA environmentDepthProvidermust be a validXrEnvironmentDepthProviderMETAhandle
Thread Safety
- Access to
environmentDepthProvider, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
environmentDepthProvider- anXrEnvironmentDepthProviderMETAhandle for the depth provider.
- The
-
xrStartEnvironmentDepthProviderMETA
public static int xrStartEnvironmentDepthProviderMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider) Starts the generation of depth maps.C Specification
The
StartEnvironmentDepthProviderMETAfunction is defined as:XrResult xrStartEnvironmentDepthProviderMETA( XrEnvironmentDepthProviderMETA environmentDepthProvider);Description
The
StartEnvironmentDepthProviderMETAfunction starts the asynchronous generation of depth maps.Starting the depth provider may use CPU and GPU resources.
Runtimes must return
ERROR_UNEXPECTED_STATE_PASSTHROUGH_FBifStartEnvironmentDepthProviderMETAis called on an already startedXrEnvironmentDepthProviderMETA.Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingStartEnvironmentDepthProviderMETA environmentDepthProvidermust be a validXrEnvironmentDepthProviderMETAhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
environmentDepthProvider- anXrEnvironmentDepthProviderMETAhandle for the depth provider.
- The
-
xrStopEnvironmentDepthProviderMETA
public static int xrStopEnvironmentDepthProviderMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider) Stops the depth feature.C Specification
The
StopEnvironmentDepthProviderMETAfunction is defined as:XrResult xrStopEnvironmentDepthProviderMETA( XrEnvironmentDepthProviderMETA environmentDepthProvider);Description
The
StopEnvironmentDepthProviderMETAfunction stops the generation of depth maps. This stops all per frame computation of environment depth for the application.Runtimes must return
ERROR_UNEXPECTED_STATE_PASSTHROUGH_FBifStopEnvironmentDepthProviderMETAis called on an already stoppedXrEnvironmentDepthProviderMETA.Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingStopEnvironmentDepthProviderMETA environmentDepthProvidermust be a validXrEnvironmentDepthProviderMETAhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
environmentDepthProvider- anXrEnvironmentDepthProviderMETAhandle for the depth provider.
- The
-
nxrCreateEnvironmentDepthSwapchainMETA
public static int nxrCreateEnvironmentDepthSwapchainMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, long createInfo, long swapchain) Unsafe version of:CreateEnvironmentDepthSwapchainMETA -
xrCreateEnvironmentDepthSwapchainMETA
public static int xrCreateEnvironmentDepthSwapchainMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, XrEnvironmentDepthSwapchainCreateInfoMETA createInfo, org.lwjgl.PointerBuffer swapchain) Returns a readable depth swapchain.C Specification
The
CreateEnvironmentDepthSwapchainMETAfunction is defined as:XrResult xrCreateEnvironmentDepthSwapchainMETA( XrEnvironmentDepthProviderMETA environmentDepthProvider, const XrEnvironmentDepthSwapchainCreateInfoMETA* createInfo, XrEnvironmentDepthSwapchainMETA* swapchain);Description
The
CreateEnvironmentDepthSwapchainMETAfunction creates a readable swapchain, which is used for accessing the depth data.The runtime decides on the resolution and length of the swapchain. Additional information about the swapchain can be accessed by calling
GetEnvironmentDepthSwapchainStateMETA.Runtimes must create a swapchain with array textures of length 2, which map to a left-eye and right-eye view. View index 0 must represent the left eye and view index 1 must represent the right eye. This is the same convention as for
VIEW_CONFIGURATION_TYPE_PRIMARY_STEREOinXrViewConfigurationType. Runtimes must create the swapchain with the following image formats depending on the graphics API associated with the session:- OpenGL:
GL_DEPTH_COMPONENT16 - Vulkan:
VK_FORMAT_D16_UNORM - Direct3D:
DXGI_FORMAT_D16_UNORM
Runtimes must only allow maximum one swapchain to exist per depth provider at any given time, and must return
ERROR_LIMIT_REACHEDifCreateEnvironmentDepthSwapchainMETAis called to create more. Applications should destroy the swapchain when no longer needed. Applications must be able to handle different swapchain lengths and resolutions.Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingCreateEnvironmentDepthSwapchainMETA environmentDepthProvidermust be a validXrEnvironmentDepthProviderMETAhandlecreateInfomust be a pointer to a validXrEnvironmentDepthSwapchainCreateInfoMETAstructureswapchainmust be a pointer to anXrEnvironmentDepthSwapchainMETAhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
environmentDepthProvider- anXrEnvironmentDepthProviderMETAhandle for the depth provider.createInfo- a pointer to anXrEnvironmentDepthSwapchainCreateInfoMETAcontaining creation options for the swapchain.swapchain- the returnedXrEnvironmentDepthSwapchainMETAhandle for the created swapchain.
- OpenGL:
-
xrDestroyEnvironmentDepthSwapchainMETA
Destroys a readable depth swapchain.C Specification
The
DestroyEnvironmentDepthSwapchainMETAfunction is defined as:XrResult xrDestroyEnvironmentDepthSwapchainMETA( XrEnvironmentDepthSwapchainMETA swapchain);Description
The
DestroyEnvironmentDepthSwapchainMETAfunction destroys a readable environment depth swapchain.All submitted graphics API commands that refer to
swapchainmust have completed execution. Runtimes may continue to utilize swapchain images afterDestroyEnvironmentDepthSwapchainMETAis called.Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingDestroyEnvironmentDepthSwapchainMETA swapchainmust be a validXrEnvironmentDepthSwapchainMETAhandle
Thread Safety
- Access to
swapchain, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
swapchain- theXrEnvironmentDepthSwapchainMETAto be destroyed.
- The
-
nxrEnumerateEnvironmentDepthSwapchainImagesMETA
public static int nxrEnumerateEnvironmentDepthSwapchainImagesMETA(XrEnvironmentDepthSwapchainMETA swapchain, int imageCapacityInput, long imageCountOutput, long images) Unsafe version of:EnumerateEnvironmentDepthSwapchainImagesMETA- Parameters:
imageCapacityInput- the capacity of the images array, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumerateEnvironmentDepthSwapchainImagesMETA
public static int xrEnumerateEnvironmentDepthSwapchainImagesMETA(XrEnvironmentDepthSwapchainMETA swapchain, IntBuffer imageCountOutput, @Nullable XrSwapchainImageBaseHeader.Buffer images) Gets images from a readable depth swapchain.C Specification
The
EnumerateEnvironmentDepthSwapchainImagesMETAfunction is defined as:XrResult xrEnumerateEnvironmentDepthSwapchainImagesMETA( XrEnvironmentDepthSwapchainMETA swapchain, uint32_t imageCapacityInput, uint32_t* imageCountOutput, XrSwapchainImageBaseHeader* images);Description
EnumerateEnvironmentDepthSwapchainImagesMETAfills an array of graphics API-specific stext:XrSwapchainImage* structures derived fromXrSwapchainImageBaseHeader. The resources must be constant and valid for the lifetime of theXrEnvironmentDepthSwapchainMETA. This function behaves analogously toEnumerateSwapchainImages.Runtimes must always return identical buffer contents from this enumeration for the lifetime of the swapchain.
Note:
imagesis a pointer to an array of structures of graphics API-specific type, not an array of structure pointers.The pointer submitted as
imageswill be treated as an array of the expected graphics API-specific type based on the graphics API used at session creation time. If the type member of any array element accessed in this way does not match the expected value, the runtime must returnERROR_VALIDATION_FAILURE.Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingEnumerateEnvironmentDepthSwapchainImagesMETA swapchainmust be a validXrEnvironmentDepthSwapchainMETAhandleimageCountOutputmust be a pointer to auint32_tvalue- If
imageCapacityInputis not 0,imagesmust be a pointer to an array ofimageCapacityInputXrSwapchainImageBaseHeader-based structures. See also:XrSwapchainImageOpenGLKHR,XrSwapchainImageVulkanKHR
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
swapchain- theXrEnvironmentDepthSwapchainMETAto get images from.imageCountOutput- a pointer to the count of images written, or a pointer to the required capacity in the case thatimageCapacityInputis insufficient.images- a pointer to an array of graphics API-specific XrSwapchainImage structures, all of the same type, based onXrSwapchainImageBaseHeader. It can beNULLifimageCapacityInputis 0.
- The
-
nxrGetEnvironmentDepthSwapchainStateMETA
public static int nxrGetEnvironmentDepthSwapchainStateMETA(XrEnvironmentDepthSwapchainMETA swapchain, long state) Unsafe version of:GetEnvironmentDepthSwapchainStateMETA -
xrGetEnvironmentDepthSwapchainStateMETA
public static int xrGetEnvironmentDepthSwapchainStateMETA(XrEnvironmentDepthSwapchainMETA swapchain, XrEnvironmentDepthSwapchainStateMETA state) Returns the state of the readable depth swapchain.C Specification
The
GetEnvironmentDepthSwapchainStateMETAfunction is defined as:XrResult xrGetEnvironmentDepthSwapchainStateMETA( XrEnvironmentDepthSwapchainMETA swapchain, XrEnvironmentDepthSwapchainStateMETA* state);Description
GetEnvironmentDepthSwapchainStateMETAretrieves information about theXrEnvironmentDepthSwapchainMETA. This information is constant throughout the lifetime of theXrEnvironmentDepthSwapchainMETA.Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingGetEnvironmentDepthSwapchainStateMETA swapchainmust be a validXrEnvironmentDepthSwapchainMETAhandlestatemust be a pointer to anXrEnvironmentDepthSwapchainStateMETAstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
swapchain- anXrEnvironmentDepthSwapchainMETAhandle.state- a pointer to anXrEnvironmentDepthSwapchainStateMETA.
- The
-
nxrAcquireEnvironmentDepthImageMETA
public static int nxrAcquireEnvironmentDepthImageMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, long acquireInfo, long environmentDepthImage) Unsafe version of:AcquireEnvironmentDepthImageMETA -
xrAcquireEnvironmentDepthImageMETA
public static int xrAcquireEnvironmentDepthImageMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, XrEnvironmentDepthImageAcquireInfoMETA acquireInfo, XrEnvironmentDepthImageMETA environmentDepthImage) Returns an image index in a readable depth swapchain and associated metadata.C Specification
The
AcquireEnvironmentDepthImageMETAfunction is defined as:XrResult xrAcquireEnvironmentDepthImageMETA( XrEnvironmentDepthProviderMETA environmentDepthProvider, const XrEnvironmentDepthImageAcquireInfoMETA* acquireInfo, XrEnvironmentDepthImageMETA* environmentDepthImage);Description
Acquires the latest available swapchain image that has been generated by the depth provider and ensures it is ready to be accessed by the application. The application may access and queue GPU operations using the acquired image until the next
EndFramecall, when the image is released and the depth provider may write new depth data into it after completion of all work queued before theEndFramecall.The returned
XrEnvironmentDepthImageMETAcontains the swapchain index into the array enumerated byEnumerateEnvironmentDepthSwapchainImagesMETA. It also contains other information such as the field of view and pose that are necessary to interpret the depth data.There must be no more than one call to
AcquireEnvironmentDepthImageMETAbetween any pair of correspondingBeginFrameandEndFramecalls in a session.- The runtime may block if previously acquired swapchain images are still being used by the graphics API.
- The runtime must return
ERROR_CALL_ORDER_INVALIDifAcquireEnvironmentDepthImageMETAis called beforeBeginFrameor afterEndFrame. - The runtime must return
ERROR_CALL_ORDER_INVALIDifAcquireEnvironmentDepthImageMETAis called on a stoppedXrEnvironmentDepthProviderMETA. - The runtime must return
ERROR_LIMIT_REACHEDifAcquireEnvironmentDepthImageMETAis called more than once per frame - i.e. in a running session, after a call toBeginFramethat has not had an associatedEndFrame. - Runtimes must return
ENVIRONMENT_DEPTH_NOT_AVAILABLE_METAif no depth frame is available yet (i.e. the provider was recently started and did not yet have time to compute depth). Note that this is a success code. In this case the output parameters must be unchanged. - The application must not utilize the swapchain image in calls to the graphics API after
EndFramehas been called. - A runtime may use the graphics API specific contexts provided to OpenXR. In particular:
- For OpenGL, a runtime may use the OpenGL context specified in the call to
CreateSession, which needs external synchronization. - For Vulkan, a runtime may use the
VkQueuespecified in theXrGraphicsBindingVulkan2KHR, which needs external synchronization.
- For OpenGL, a runtime may use the OpenGL context specified in the call to
Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingAcquireEnvironmentDepthImageMETA environmentDepthProvidermust be a validXrEnvironmentDepthProviderMETAhandleacquireInfomust be a pointer to a validXrEnvironmentDepthImageAcquireInfoMETAstructureenvironmentDepthImagemust be a pointer to anXrEnvironmentDepthImageMETAstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrEnvironmentDepthImageAcquireInfoMETA,XrEnvironmentDepthImageMETA- Parameters:
environmentDepthProvider- anXrEnvironmentDepthProviderMETAhandle for the depth provider.acquireInfo- anXrEnvironmentDepthImageAcquireInfoMETAcontaining parameters for populating a depth swapchain image.environmentDepthImage- the returnedXrEnvironmentDepthImageMETAcontaining information about the acquired depth image.
-
nxrSetEnvironmentDepthHandRemovalMETA
public static int nxrSetEnvironmentDepthHandRemovalMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, long setInfo) Unsafe version of:SetEnvironmentDepthHandRemovalMETA -
xrSetEnvironmentDepthHandRemovalMETA
public static int xrSetEnvironmentDepthHandRemovalMETA(XrEnvironmentDepthProviderMETA environmentDepthProvider, XrEnvironmentDepthHandRemovalSetInfoMETA setInfo) Enables/disables hand removal from the depth map.C Specification
The
SetEnvironmentDepthHandRemovalMETAfunction is defined as:XrResult xrSetEnvironmentDepthHandRemovalMETA( XrEnvironmentDepthProviderMETA environmentDepthProvider, const XrEnvironmentDepthHandRemovalSetInfoMETA* setInfo);Description
The
SetEnvironmentDepthHandRemovalMETAfunction sets hand removal options.Runtimes should enable or disable the removal of the hand depths from the depth map. If enabled, the corresponding depth pixels should be replaced with the estimated background depth behind the hands. Runtimes must return
ERROR_FEATURE_UNSUPPORTEDif and only ifXrSystemEnvironmentDepthPropertiesMETA::supportsHandRemovalisFALSE.Valid Usage (Implicit)
- The
XR_META_environment_depthextension must be enabled prior to callingSetEnvironmentDepthHandRemovalMETA environmentDepthProvidermust be a validXrEnvironmentDepthProviderMETAhandlesetInfomust be a pointer to a validXrEnvironmentDepthHandRemovalSetInfoMETAstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
environmentDepthProvider- anXrEnvironmentDepthProviderMETAhandle for the depth provider.setInfo- a pointer to anXrEnvironmentDepthHandRemovalSetInfoMETAcontaining options for the hand removal.
- The
-