Module xr_android_depth_texture

Module xr_android_depth_texture 

Source
Expand description

TODO: XR_ANDROID_depth_texture extension implementation (AndroidXR)

This module provides access to the OpenXR XR_ANDROID_depth_texture extension, which allows Android applications to access depth and confidence texture data from the device’s depth sensors.

The extension provides both raw and smooth depth data, along with confidence values for each pixel, enabling advanced computer vision and depth-aware rendering applications.

§Features

  • Multiple Resolution Support: Quarter, half, and full resolution depth textures
  • Raw and Processed Data: Access to both raw sensor data and smoothed depth information
  • Confidence Values: Per-pixel confidence metrics for depth accuracy assessment
  • Swapchain Management: Efficient depth texture rendering through OpenXR swapchains
  • System Capability Detection: Runtime checking for depth tracking support

§OpenXR Specification

This implementation follows the XR_ANDROID_depth_texture extension specification version 1, providing access to Android-specific depth sensor capabilities. https://developer.android.com/develop/xr/openxr/extensions/XR_ANDROID_depth_texture

Structs§

DepthResolutionInfoAndroid
Structures for the depth texture extension Information about depth resolution capabilities
DepthSurfaceInfoAndroid
Surface information for depth texture rendering
DepthSwapchainCreateInfoAndroid
Creation parameters for depth swapchains
DepthSwapchainImageAndroid
Individual depth swapchain image containing multiple texture types
DepthTextureAndroid
Handle to a depth texture resource
DepthTextureCreateInfoAndroid
Creation parameters for depth textures
XrAndroidDepthTexture
Main extension handler for Android depth texture functionality
XrSystemDepthTrackingPropertiesANDROID
System properties structure for depth tracking capabilities

Constants§

SURFACE_ORIGIN_BOTTOM_LEFT_ANDROID
SURFACE_ORIGIN_TOP_LEFT_ANDROID
Surface origin constants for Android depth textures
XR_ANDROID_DEPTH_TEXTURE_EXTENSION_NAME
Extension name for XR_FB_render_model
XR_DEPTH_RESOLUTION_FULL_ANDROID
XR_DEPTH_RESOLUTION_HALF_ANDROID
XR_DEPTH_RESOLUTION_QUARTER_ANDROID
Depth resolution enumeration values These define the available depth texture resolutions relative to the main display
XR_DEPTH_SWAPCHAIN_CREATE_RAW_CONFIDENCE_IMAGE_BIT_ANDROID
XR_DEPTH_SWAPCHAIN_CREATE_RAW_DEPTH_IMAGE_BIT_ANDROID
XR_DEPTH_SWAPCHAIN_CREATE_SMOOTH_CONFIDENCE_IMAGE_BIT_ANDROID
XR_DEPTH_SWAPCHAIN_CREATE_SMOOTH_DEPTH_IMAGE_BIT_ANDROID
Depth swapchain creation flags for different types of depth data These flags control which depth and confidence images are generated
XR_TYPE_DEPTH_RESOLUTION_INFO_ANDROID_RAW
Raw structure type constants for direct OpenXR API usage
XR_TYPE_DEPTH_SURFACE_INFO_ANDROID_RAW
XR_TYPE_DEPTH_SWAPCHAIN_CREATE_INFO_ANDROID_RAW
XR_TYPE_DEPTH_SWAPCHAIN_IMAGE_ANDROID_RAW
XR_TYPE_DEPTH_TEXTURE_ANDROID_RAW
XR_TYPE_DEPTH_TEXTURE_CREATE_INFO_ANDROID_RAW
XR_TYPE_SYSTEM_DEPTH_TRACKING_PROPERTIES_ANDROID_RAW

Functions§

create_depth_swapchain_info
Create a depth swapchain creation info structure
create_depth_texture_info
Helper function to create depth texture creation info
get_resolution_dimensions
Helper functions used by lib.rs Get the pixel dimensions for a given depth resolution enum
is_android_depth_texture_extension_available
Convenience function to check if XR_FB_render_model extension is available
test_depth_texture_extension
Comprehensive test function for XR_ANDROID_depth_texture extension
xr_type_depth_resolution_info_android
Structure type functions (using raw values from OpenXR specification)
xr_type_depth_surface_info_android
xr_type_depth_swapchain_create_info_android
xr_type_depth_swapchain_image_android
xr_type_depth_texture_android
xr_type_depth_texture_create_info_android
xr_type_system_depth_tracking_properties_android

Type Aliases§

ActionType
DepthResolutionAndroid
DepthSwapchainCreateFlagsAndroid
ReferenceSpaceType
SessionState
SpaceLocationFlags
SurfaceOriginAndroid
Type definitions for XR_ANDROID_depth_texture (openxr_sys compatible)
ViewConfigurationType