Forum Discussion
MichaelSedrak
3 years agoHonored Guest
Get Device Physical Screen Resolution
I am trying to get the physical width and height of the device to create the swapchains.
With the old Native VrApi that is currently deprecated, I could use VRAPI_SYS_PROP_DISPLAY_PIXELS_WIDE and VRAPI_SYS_PROP_DISPLAY_PIXELS_HIGH to retreive the correct physical screen resolution.
When tested on the Meta Quest 2, the results were 1,832 and 1920.
I am moving my code to use Native OpenXR.
Using the OpenXR Runtime when I query for
typedef struct XrViewConfigurationView {
XrStructureType type;
void* XR_MAY_ALIAS next;
uint32_t recommendedImageRectWidth;
uint32_t maxImageRectWidth;
uint32_t recommendedImageRectHeight;
uint32_t maxImageRectHeight;
uint32_t recommendedSwapchainSampleCount;
uint32_t maxSwapchainSampleCount;
} XrViewConfigurationView;
and for
typedef struct XrSystemGraphicsProperties {
uint32_t maxSwapchainImageHeight;
uint32_t maxSwapchainImageWidth;
uint32_t maxLayerCount;
} XrSystemGraphicsProperties;
The recommended width and height I receive are 1440 and 1584, while for the maxSwapchainImageWidth, maxSwapchainImageHeight, maxImageRectWidth and maxImageRectHeight, I am receiving 8192.
I believe the maximum swapchain size should be the physical size of the screen.
Or maybe there is another way to retreive the physical screen resolution like it was implemented in the deprecated VrAPI.
System Information:
Device: Meta Quest 2
Build: Meta Quest build 50.0
OpenXR Loader Version: 1.0.24
Development: OpenXR Native API
No RepliesBe the first to reply
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 8 months ago