Class KHRWin32ConvertPerformanceCounterTime

java.lang.Object
org.lwjgl.openxr.KHRWin32ConvertPerformanceCounterTime

public class KHRWin32ConvertPerformanceCounterTime extends Object
The XR_KHR_win32_convert_performance_counter_time extension.

This extension provides two functions for converting between the Windows performance counter (QPC) time stamps and XrTime. The ConvertWin32PerformanceCounterToTimeKHR function converts from Windows performance counter time stamps to XrTime, while the ConvertTimeToWin32PerformanceCounterKHR function converts XrTime to Windows performance counter time stamps. The primary use case for this functionality is to be able to synchronize events between the local system and the OpenXR system.

  • Field Details

    • XR_KHR_win32_convert_performance_counter_time_SPEC_VERSION

      public static final int XR_KHR_win32_convert_performance_counter_time_SPEC_VERSION
      The extension specification version.
      See Also:
    • XR_KHR_WIN32_CONVERT_PERFORMANCE_COUNTER_TIME_EXTENSION_NAME

      public static final String XR_KHR_WIN32_CONVERT_PERFORMANCE_COUNTER_TIME_EXTENSION_NAME
      The extension name.
      See Also:
  • Method Details

    • nxrConvertWin32PerformanceCounterToTimeKHR

      public static int nxrConvertWin32PerformanceCounterToTimeKHR(org.lwjgl.openxr.XrInstance instance, long performanceCounter, long time)
    • xrConvertWin32PerformanceCounterToTimeKHR

      public static int xrConvertWin32PerformanceCounterToTimeKHR(org.lwjgl.openxr.XrInstance instance, org.lwjgl.system.windows.LARGE_INTEGER performanceCounter, LongBuffer time)
      Convert Win32 QueryPerformanceCounter time to XrTime.
      C Specification

      To convert from a Windows performance counter time stamp to XrTime, call:

      
       XrResult xrConvertWin32PerformanceCounterToTimeKHR(
           XrInstance                                  instance,
           const LARGE_INTEGER*                        performanceCounter,
           XrTime*                                     time);
      Description

      The ConvertWin32PerformanceCounterToTimeKHR function converts a time stamp obtained by the QueryPerformanceCounter Windows function to the equivalent XrTime.

      If the output time cannot represent the input performanceCounter, the runtime must return ERROR_TIME_INVALID.

      Valid Usage (Implicit)
      Return Codes
      On success, this command returns
      On failure, this command returns
      Parameters:
      instance - an XrInstance handle previously created with CreateInstance.
      performanceCounter - a time returned by QueryPerformanceCounter.
      time - the resulting XrTime that is equivalent to the performanceCounter.
    • nxrConvertTimeToWin32PerformanceCounterKHR

      public static int nxrConvertTimeToWin32PerformanceCounterKHR(org.lwjgl.openxr.XrInstance instance, long time, long performanceCounter)
    • xrConvertTimeToWin32PerformanceCounterKHR

      public static int xrConvertTimeToWin32PerformanceCounterKHR(org.lwjgl.openxr.XrInstance instance, long time, org.lwjgl.system.windows.LARGE_INTEGER performanceCounter)
      Convert XrTime to Win32 QueryPerformanceCounter time.
      C Specification

      To convert from XrTime to a Windows performance counter time stamp, call:

      
       XrResult xrConvertTimeToWin32PerformanceCounterKHR(
           XrInstance                                  instance,
           XrTime                                      time,
           LARGE_INTEGER*                              performanceCounter);
      Description

      The ConvertTimeToWin32PerformanceCounterKHR function converts an XrTime to time as if generated by the QueryPerformanceCounter Windows function.

      If the output performanceCounter cannot represent the input time, the runtime must return ERROR_TIME_INVALID.

      Valid Usage (Implicit)
      Return Codes
      On success, this command returns
      On failure, this command returns
      Parameters:
      instance - an XrInstance handle previously created with CreateInstance.
      time - an XrTime.
      performanceCounter - the resulting Windows performance counter time stamp that is equivalent to the time.