Some applications may wish to access XR interaction devices without presenting any image content on the display(s). This extension provides a mechanism for writing such an application using the OpenXR API. It modifies the specification in the following ways, without adding any new named entities.
CreateSession without an stext:XrGraphicsBinding* structure in its next chain. In this case, the runtime must create a "headless" session that does not interact with the display.SESSION_STATE_READY directly from SESSION_STATE_IDLE.XrSessionBeginInfo::primaryViewConfigurationType must be ignored and may be 0.SESSION_STATE_SYNCHRONIZED, then SESSION_STATE_VISIBLE and SESSION_STATE_FOCUSED, after the call to BeginSession. The application does not need to call WaitFrame, BeginFrame, or EndFrame, unlike with non-headless sessions.EnumerateSwapchainFormats must return SUCCESS but enumerate 0 formats.WaitFrame must set XrFrameState::shouldRender to FALSE in a headless session. The VISIBLE and FOCUSED states are only used for their input-related semantics, not their rendering-related semantics, and these functions are permitted to allow minimal change between headless and non-headless code if desired.Because WaitFrame is not required, an application using a headless session should sleep periodically to avoid consuming all available system resources in a busy-wait loop.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | XR_MND_HEADLESS_EXTENSION_NAME
The extension name. |
| public static final int | XR_MND_headless_SPEC_VERSION
The extension specification version. |
| Access | Constructor and Description |
|---|---|
| private |
| XR_MND_HEADLESS_EXTENSION_NAME | back to summary |
|---|---|
| public static final String XR_MND_HEADLESS_EXTENSION_NAME The extension name. | |
| XR_MND_headless_SPEC_VERSION | back to summary |
|---|---|
| public static final int XR_MND_headless_SPEC_VERSION The extension specification version. | |
| MNDHeadless | back to summary |
|---|---|
| private MNDHeadless() | |