Class METARecommendedLayerResolution
The extension allows an application to request a recommended swapchain resolution from the runtime, in order to either allocate a swapchain of a more appropriate size, or to render into a smaller image rect according to the recommendation. For layers with multiple views such as XrCompositionLayerProjection, the application may scale the individual views to match the scaled swapchain resolution.
The runtime may use any factors to drive the recommendation it wishes to return to the application. Those include static properties such as screen resolution and HMD type, but also dynamic ones such as layer positioning and system-wide GPU utilization.
Application may also use this extension to allocate the swapchain by passing in a layer with a swapchain handle NULL_HANDLE.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrGetRecommendedLayerResolutionMETA(XrSession session, long info, long resolution) Unsafe version of:GetRecommendedLayerResolutionMETAstatic intxrGetRecommendedLayerResolutionMETA(XrSession session, XrRecommendedLayerResolutionGetInfoMETA info, XrRecommendedLayerResolutionMETA resolution) Get the recommended layer resolution for a layer from the runtime.
-
Field Details
-
XR_META_recommended_layer_resolution_SPEC_VERSION
public static final int XR_META_recommended_layer_resolution_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_META_RECOMMENDED_LAYER_RESOLUTION_EXTENSION_NAME
The extension name.- See Also:
-
XR_TYPE_RECOMMENDED_LAYER_RESOLUTION_META
public static final int XR_TYPE_RECOMMENDED_LAYER_RESOLUTION_METAExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_RECOMMENDED_LAYER_RESOLUTION_GET_INFO_META
public static final int XR_TYPE_RECOMMENDED_LAYER_RESOLUTION_GET_INFO_METAExtendsXrStructureType.Enum values:
- See Also:
-
-
Method Details
-
nxrGetRecommendedLayerResolutionMETA
public static int nxrGetRecommendedLayerResolutionMETA(XrSession session, long info, long resolution) Unsafe version of:GetRecommendedLayerResolutionMETA -
xrGetRecommendedLayerResolutionMETA
public static int xrGetRecommendedLayerResolutionMETA(XrSession session, XrRecommendedLayerResolutionGetInfoMETA info, XrRecommendedLayerResolutionMETA resolution) Get the recommended layer resolution for a layer from the runtime.C Specification
The
GetRecommendedLayerResolutionMETAfunction is defined as:XrResult xrGetRecommendedLayerResolutionMETA( XrSession session, const XrRecommendedLayerResolutionGetInfoMETA* info, XrRecommendedLayerResolutionMETA* resolution);Description
The
GetRecommendedLayerResolutionMETAfunction returns the recommendation that the runtime wishes to make to the application for the layer provided in theXrRecommendedLayerResolutionGetInfoMETAstructure. Application may choose to reallocate their swapchain or scale view resolution accordingly. Applications rendering multiple views into the swapchain may scale individual views to match the recommended swapchain resolution.The runtime may not wish to make any recommendation, in which case it must return an
XrRecommendedLayerResolutionMETA::isValidvalue ofFALSE.If the
XrRecommendedLayerResolutionGetInfoMETA::layerattribute of theinfoargument of the function contains valid swapchain handles in all fields where required, the runtime must return a resolution recommendation which is less than or equal to the size of that swapchain, so that the application may render into an existing swapchain or swapchains without reallocation. As an exception to valid usage, an otherwise-valid structure passed asXrRecommendedLayerResolutionGetInfoMETA::layermay containNULL_HANDLEin place of validXrSwapchainhandle(s) for this function only, to obtain a recommended resolution resolution for the purpose of allocating a swapchain. If at least one otherwise-requiredXrSwapchainhandle withinXrRecommendedLayerResolutionGetInfoMETA::layerisNULL_HANDLE, the runtime must interpret this as a request for recommended resolution without limitation to the allocated size of any existing swapchain.If the runtime makes a recommendation, it should make a recommendation that is directly usable by the application to render its frames without creating adverse visual effects for the user.
See Also
XrRecommendedLayerResolutionGetInfoMETA,XrRecommendedLayerResolutionMETA- Parameters:
session- theXrSessionin which the recommendation is made.info- a pointer to anXrRecommendedLayerResolutionGetInfoMETAstructure containing the details of the layer for which the application is requesting a recommendation.resolution- a pointer to anXrRecommendedLayerResolutionMETAthat the runtime will populate.
-