Class KHRWin32ConvertPerformanceCounterTime
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrConvertTimeToWin32PerformanceCounterKHR(org.lwjgl.openxr.XrInstance instance, long time, long performanceCounter) Unsafe version of:ConvertTimeToWin32PerformanceCounterKHRstatic intnxrConvertWin32PerformanceCounterToTimeKHR(org.lwjgl.openxr.XrInstance instance, long performanceCounter, long time) Unsafe version of:ConvertWin32PerformanceCounterToTimeKHRstatic intxrConvertTimeToWin32PerformanceCounterKHR(org.lwjgl.openxr.XrInstance instance, long time, org.lwjgl.system.windows.LARGE_INTEGER performanceCounter) Convert XrTime to Win32QueryPerformanceCountertime.static intxrConvertWin32PerformanceCounterToTimeKHR(org.lwjgl.openxr.XrInstance instance, org.lwjgl.system.windows.LARGE_INTEGER performanceCounter, LongBuffer time) Convert Win32QueryPerformanceCountertime to XrTime.
-
Field Details
-
XR_KHR_win32_convert_performance_counter_time_SPEC_VERSION
public static final int XR_KHR_win32_convert_performance_counter_time_SPEC_VERSIONThe extension specification version.- See Also:
-
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) Unsafe version of:ConvertWin32PerformanceCounterToTimeKHR -
xrConvertWin32PerformanceCounterToTimeKHR
public static int xrConvertWin32PerformanceCounterToTimeKHR(org.lwjgl.openxr.XrInstance instance, org.lwjgl.system.windows.LARGE_INTEGER performanceCounter, LongBuffer time) Convert Win32QueryPerformanceCountertime 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
ConvertWin32PerformanceCounterToTimeKHRfunction converts a time stamp obtained by theQueryPerformanceCounterWindows function to the equivalentXrTime.If the output
timecannot represent the inputperformanceCounter, the runtime must returnERROR_TIME_INVALID.Valid Usage (Implicit)
- The
XR_KHR_win32_convert_performance_counter_timeextension must be enabled prior to callingConvertWin32PerformanceCounterToTimeKHR instancemust be a validXrInstancehandleperformanceCountermust be a pointer to a validLARGE_INTEGERvaluetimemust be a pointer to anXrTimevalue
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
instance- anXrInstancehandle previously created withCreateInstance.performanceCounter- a time returned byQueryPerformanceCounter.time- the resultingXrTimethat is equivalent to theperformanceCounter.
- The
-
nxrConvertTimeToWin32PerformanceCounterKHR
public static int nxrConvertTimeToWin32PerformanceCounterKHR(org.lwjgl.openxr.XrInstance instance, long time, long performanceCounter) Unsafe version of:ConvertTimeToWin32PerformanceCounterKHR -
xrConvertTimeToWin32PerformanceCounterKHR
public static int xrConvertTimeToWin32PerformanceCounterKHR(org.lwjgl.openxr.XrInstance instance, long time, org.lwjgl.system.windows.LARGE_INTEGER performanceCounter) Convert XrTime to Win32QueryPerformanceCountertime.C Specification
To convert from
XrTimeto a Windows performance counter time stamp, call:XrResult xrConvertTimeToWin32PerformanceCounterKHR( XrInstance instance, XrTime time, LARGE_INTEGER* performanceCounter);Description
The
ConvertTimeToWin32PerformanceCounterKHRfunction converts anXrTimeto time as if generated by theQueryPerformanceCounterWindows function.If the output
performanceCountercannot represent the inputtime, the runtime must returnERROR_TIME_INVALID.Valid Usage (Implicit)
- The
XR_KHR_win32_convert_performance_counter_timeextension must be enabled prior to callingConvertTimeToWin32PerformanceCounterKHR instancemust be a validXrInstancehandleperformanceCountermust be a pointer to aLARGE_INTEGERvalue
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
instance- anXrInstancehandle previously created withCreateInstance.time- anXrTime.performanceCounter- the resulting Windows performance counter time stamp that is equivalent to thetime.
- The
-