All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.openxr.METAFoveationEyeTracked Maven / Gradle / Ivy

Go to download

A royalty-free, open standard that provides high-performance access to Augmented Reality (AR) and Virtual Reality (VR)—collectively known as XR—platforms and devices.

There is a newer version: 3.3.6
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.openxr;

import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;

/**
 * The XR_META_foveation_eye_tracked extension.
 * 
 * 

Eye tracked foveated rendering renders lower pixel density in the periphery of the user’s gaze, taking advantage of low peripheral acuity.

* *

This extension allows:

* *
    *
  • An application to query eye tracked foveation availability.
  • *
  • An application to request eye tracked foveation profile supported by the runtime and apply them to foveation-supported swapchains.
  • *
  • An application to query foveation center position every frame.
  • *
  • An application to request a foveation pattern update from the runtime. As a consequence, runtime knows how to adjust the eye tracking camera exposure start time in order to optimize the total pipeline latency.
  • *
* *

In order to enable the functionality of this extension, the application must pass the name of the extension into {@link XR10#xrCreateInstance CreateInstance} via the {@link XrInstanceCreateInfo}{@code ::enabledExtensionNames} parameter as indicated in the extension section.

*/ public class METAFoveationEyeTracked { /** The extension specification version. */ public static final int XR_META_foveation_eye_tracked_SPEC_VERSION = 1; /** The extension name. */ public static final String XR_META_FOVEATION_EYE_TRACKED_EXTENSION_NAME = "XR_META_foveation_eye_tracked"; /** XR_FOVEATION_CENTER_SIZE_META */ public static final int XR_FOVEATION_CENTER_SIZE_META = 2; /** * Extends {@code XrStructureType}. * *
Enum values:
* *
    *
  • {@link #XR_TYPE_FOVEATION_EYE_TRACKED_PROFILE_CREATE_INFO_META TYPE_FOVEATION_EYE_TRACKED_PROFILE_CREATE_INFO_META}
  • *
  • {@link #XR_TYPE_FOVEATION_EYE_TRACKED_STATE_META TYPE_FOVEATION_EYE_TRACKED_STATE_META}
  • *
  • {@link #XR_TYPE_SYSTEM_FOVEATION_EYE_TRACKED_PROPERTIES_META TYPE_SYSTEM_FOVEATION_EYE_TRACKED_PROPERTIES_META}
  • *
*/ public static final int XR_TYPE_FOVEATION_EYE_TRACKED_PROFILE_CREATE_INFO_META = 1000200000, XR_TYPE_FOVEATION_EYE_TRACKED_STATE_META = 1000200001, XR_TYPE_SYSTEM_FOVEATION_EYE_TRACKED_PROPERTIES_META = 1000200002; /** * XrFoveationEyeTrackedStateFlagBitsMETA - XrFoveationEyeTrackedStateFlagBitsMETA * *
Flag Descriptions
* *
    *
  • {@link #XR_FOVEATION_EYE_TRACKED_STATE_VALID_BIT_META FOVEATION_EYE_TRACKED_STATE_VALID_BIT_META} — Indicates whether or not foveation data is valid. This can happen if the eye tracker is obscured, the camera has dirt, or eye lid is closed, etc.
  • *
*/ public static final int XR_FOVEATION_EYE_TRACKED_STATE_VALID_BIT_META = 0x1; protected METAFoveationEyeTracked() { throw new UnsupportedOperationException(); } // --- [ xrGetFoveationEyeTrackedStateMETA ] --- /** Unsafe version of: {@link #xrGetFoveationEyeTrackedStateMETA GetFoveationEyeTrackedStateMETA} */ public static int nxrGetFoveationEyeTrackedStateMETA(XrSession session, long foveationState) { long __functionAddress = session.getCapabilities().xrGetFoveationEyeTrackedStateMETA; if (CHECKS) { check(__functionAddress); } return callPPI(session.address(), foveationState, __functionAddress); } /** * Get the current eye tracked foveation state. * *
C Specification
* *

The {@link #xrGetFoveationEyeTrackedStateMETA GetFoveationEyeTrackedStateMETA} function is defined as:

* *

     * XrResult xrGetFoveationEyeTrackedStateMETA(
     *     XrSession                                   session,
     *     XrFoveationEyeTrackedStateMETA*             foveationState);
* *
Description
* *

The {@link #xrGetFoveationEyeTrackedStateMETA GetFoveationEyeTrackedStateMETA} function returns the current eye tracked foveation state including the center of the foveal region, validity of the foveation data, etc.

* *

Note that {@link FBSwapchainUpdateState#xrUpdateSwapchainFB UpdateSwapchainFB} should be called right before the {@link #xrGetFoveationEyeTrackedStateMETA GetFoveationEyeTrackedStateMETA} function in order to (1) request a foveation pattern update by the runtime (2) optionally instruct the runtime to adjust the eye tracking camera capture start time in order to optimize for pipeline latency.

* *
Valid Usage (Implicit)
* *
    *
  • The {@link METAFoveationEyeTracked XR_META_foveation_eye_tracked} extension must be enabled prior to calling {@link #xrGetFoveationEyeTrackedStateMETA GetFoveationEyeTrackedStateMETA}
  • *
  • {@code session} must be a valid {@code XrSession} handle
  • *
  • {@code foveationState} must be a pointer to an {@link XrFoveationEyeTrackedStateMETA} structure
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link XR10#XR_SUCCESS SUCCESS}
  • *
  • {@link XR10#XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
  • *
*
On failure, this command returns
*
    *
  • {@link XR10#XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED}
  • *
  • {@link XR10#XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
  • *
  • {@link XR10#XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
  • *
  • {@link XR10#XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
  • *
  • {@link XR10#XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
  • *
  • {@link XR10#XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
  • *
  • {@link XR10#XR_ERROR_FEATURE_UNSUPPORTED ERROR_FEATURE_UNSUPPORTED}
  • *
*
* *
See Also
* *

{@link XrFoveationEyeTrackedStateMETA}

* * @param session the {@code XrSession} in which the eye tracked foveation profile is applied. * @param foveationState a pointer to an {@link XrFoveationEyeTrackedStateMETA} structure returning the current eye tracked foveation state. */ @NativeType("XrResult") public static int xrGetFoveationEyeTrackedStateMETA(XrSession session, @NativeType("XrFoveationEyeTrackedStateMETA *") XrFoveationEyeTrackedStateMETA foveationState) { return nxrGetFoveationEyeTrackedStateMETA(session, foveationState.address()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy