Class XrFoveatedViewConfigurationViewVARJO

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrFoveatedViewConfigurationViewVARJO>
org.lwjgl.openxr.XrFoveatedViewConfigurationViewVARJO
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrFoveatedViewConfigurationViewVARJO extends org.lwjgl.system.Struct<XrFoveatedViewConfigurationViewVARJO> implements org.lwjgl.system.NativeResource
Foveated view configuration views.
Valid Usage (Implicit)

For example:


 XrInstance instance; // previously populated
 XrSystemId systemId; // previously populated
 XrViewConfigurationType viewConfigType; // Select XR_VIEW_CONFIGURATION_TYPE_PRIMARY_QUAD_VARJO
 
 XrSystemFoveatedRenderingPropertiesVARJO foveatedRenderingProperties{XR_TYPE_SYSTEM_FOVEATED_RENDERING_PROPERTIES_VARJO};
 XrSystemProperties systemProperties{XR_TYPE_SYSTEM_PROPERTIES, &foveatedRenderingProperties};
 CHK_XR(xrGetSystemProperties(instance, systemId, &systemProperties));
 
 uint32_t viewCount;
 CHK_XR(xrEnumerateViewConfigurationViews(instance, systemId, viewConfigType, 0, &viewCount, nullptr));
 // Non-foveated rendering views dimensions
 std::vector<XrViewConfigurationView> configViews(viewCount, {XR_TYPE_VIEW_CONFIGURATION_VIEW});
 CHK_XR(xrEnumerateViewConfigurationViews(instance, systemId, viewConfigType, viewCount, &viewCount, configViews.data()));
 
 // Foveated rendering views dimensions
 std::vector<XrViewConfigurationView> foveatedViews;
 if (foveatedRenderingProperties.supportsFoveatedRendering && viewConfigType == XR_VIEW_CONFIGURATION_TYPE_PRIMARY_QUAD_VARJO) {
   std::vector<XrFoveatedViewConfigurationViewVARJO> requestFoveatedConfig{4, {XR_TYPE_FOVEATED_VIEW_CONFIGURATION_VIEW_VARJO, nullptr, XR_TRUE}};
   foveatedViews = std::vector<XrViewConfigurationView>{4, {XR_TYPE_VIEW_CONFIGURATION_VIEW}};
   for (size_t i = 0; i < 4; i++) {
     foveatedViews[i].next = &requestFoveatedConfig[i];
   }
   CHK_XR(xrEnumerateViewConfigurationViews(instance, systemId, viewConfigType, viewCount, &viewCount, foveatedViews.data()));
 }
Note

Applications using this extension are encouraged to create two sets of swapchains or one big enough set of swapchains and two sets of viewports. One set will be used when rendering gaze is not available and other one will be used when foveated rendering and rendering gaze is available. Using foveated textures may not provide optimal visual quality when rendering gaze is not available.

See Also

XrViewConfigurationView

Layout


 struct XrFoveatedViewConfigurationViewVARJO {
     XrStructureType type();
     void * next();
     XrBool32 foveatedRenderingActive();
 }