Class FBFoveation
Foveation in the context of XR is a rendering technique that allows the area of an image near the focal point or fovea of the eye to be displayed at higher resolution than areas in the periphery. This trades some visual fidelity in the periphery, where it is less noticeable for the user, for improved rendering performance, most notably regarding the fragment shader, as fewer pixels or subpixels in the periphery need to be shaded and processed. On platforms which support foveation patterns and features tailored towards the optical properties, performance profiles, and hardware support of specific HMDs, application developers may request and use available foveation profiles from the runtime. Foveation profiles refer to a set of properties describing how, when, and where foveation will be applied.
This extension allows:
- An application to create swapchains that can support foveation for its graphics API.
- An application to request foveation profiles supported by the runtime and apply them to foveation-supported swapchains.
In order to enable the functionality of this extension, you must pass the name of the extension into CreateInstance via the XrInstanceCreateInfo enabledExtensionNames parameter as indicated in the extension section.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrObjectType.static final intXrSwapchainCreateFoveationFlagBitsFB - XrSwapchainCreateFoveationFlagBitsFBstatic final intXrSwapchainCreateFoveationFlagBitsFB - XrSwapchainCreateFoveationFlagBitsFBstatic final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrCreateFoveationProfileFB(XrSession session, long createInfo, long profile) Unsafe version of:CreateFoveationProfileFBstatic intxrCreateFoveationProfileFB(XrSession session, XrFoveationProfileCreateInfoFB createInfo, org.lwjgl.PointerBuffer profile) Create a foveation profile.static intDestroy a foveation profile.
-
Field Details
-
XR_FB_foveation_SPEC_VERSION
public static final int XR_FB_foveation_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_FB_FOVEATION_EXTENSION_NAME
The extension name.- See Also:
-
XR_OBJECT_TYPE_FOVEATION_PROFILE_FB
public static final int XR_OBJECT_TYPE_FOVEATION_PROFILE_FBExtendsXrObjectType.- See Also:
-
XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FB
public static final int XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB
public static final int XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB
public static final int XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FBExtendsXrStructureType.Enum values:
- See Also:
-
XR_SWAPCHAIN_CREATE_FOVEATION_SCALED_BIN_BIT_FB
public static final int XR_SWAPCHAIN_CREATE_FOVEATION_SCALED_BIN_BIT_FBXrSwapchainCreateFoveationFlagBitsFB - XrSwapchainCreateFoveationFlagBitsFBFlag Descriptions
SWAPCHAIN_CREATE_FOVEATION_SCALED_BIN_BIT_FB— Explicitly create the swapchain with scaled bin foveation support. The application must ensure that the swapchain is using the OpenGL graphics API and that the QCOM_texture_foveated extension is supported and enabled.SWAPCHAIN_CREATE_FOVEATION_FRAGMENT_DENSITY_MAP_BIT_FB— Explicitly create the swapchain with fragment density map foveation support. The application must ensure that the swapchain is using the Vulkan graphics API and that the VK_EXT_fragment_density_map extension is supported and enabled.
- See Also:
-
XR_SWAPCHAIN_CREATE_FOVEATION_FRAGMENT_DENSITY_MAP_BIT_FB
public static final int XR_SWAPCHAIN_CREATE_FOVEATION_FRAGMENT_DENSITY_MAP_BIT_FBXrSwapchainCreateFoveationFlagBitsFB - XrSwapchainCreateFoveationFlagBitsFBFlag Descriptions
SWAPCHAIN_CREATE_FOVEATION_SCALED_BIN_BIT_FB— Explicitly create the swapchain with scaled bin foveation support. The application must ensure that the swapchain is using the OpenGL graphics API and that the QCOM_texture_foveated extension is supported and enabled.SWAPCHAIN_CREATE_FOVEATION_FRAGMENT_DENSITY_MAP_BIT_FB— Explicitly create the swapchain with fragment density map foveation support. The application must ensure that the swapchain is using the Vulkan graphics API and that the VK_EXT_fragment_density_map extension is supported and enabled.
- See Also:
-
-
Method Details
-
nxrCreateFoveationProfileFB
Unsafe version of:CreateFoveationProfileFB -
xrCreateFoveationProfileFB
public static int xrCreateFoveationProfileFB(XrSession session, XrFoveationProfileCreateInfoFB createInfo, org.lwjgl.PointerBuffer profile) Create a foveation profile.C Specification
The
CreateFoveationProfileFBfunction is defined as:XrResult xrCreateFoveationProfileFB( XrSession session, const XrFoveationProfileCreateInfoFB* createInfo, XrFoveationProfileFB* profile);Description
Creates an
XrFoveationProfileFBhandle. The returned foveation profile handle may be subsequently used in API calls.Valid Usage (Implicit)
- The
XR_FB_foveationextension must be enabled prior to callingCreateFoveationProfileFB sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrFoveationProfileCreateInfoFBstructureprofilemust be a pointer to anXrFoveationProfileFBhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionthat created the swapchains to which this foveation profile will be applied.createInfo- a pointer to anXrFoveationProfileCreateInfoFBstructure containing parameters to be used to create the foveation profile.profile- a pointer to a handle in which the createdXrFoveationProfileFBis returned.
- The
-
xrDestroyFoveationProfileFB
Destroy a foveation profile.C Specification
The
DestroyFoveationProfileFBfunction is defined as:XrResult xrDestroyFoveationProfileFB( XrFoveationProfileFB profile);Description
XrFoveationProfileFBhandles are destroyed usingDestroyFoveationProfileFB. AXrFoveationProfileFBmay be safely destroyed after being applied to a swapchain state usingUpdateSwapchainFBwithout affecting the foveation parameters of the swapchain. The application is responsible for ensuring that it has no calls using profile in progress when the foveation profile is destroyed.Valid Usage (Implicit)
- The
XR_FB_foveationextension must be enabled prior to callingDestroyFoveationProfileFB profilemust be a validXrFoveationProfileFBhandle
Thread Safety
- Access to
profile, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
profile- theXrFoveationProfileFBto destroy.
- The
-