Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class KHRWin32ConvertPerformanceCounterTime

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*, org.lwjgl.system.windows.*

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 Summary

Modifier and TypeField and Description
public static final String
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nxrConvertTimeToWin32PerformanceCounterKHR(XrInstance instance, long time, long performanceCounter)

Unsafe version of: ConvertTimeToWin32PerformanceCounterKHR

public static int
nxrConvertWin32PerformanceCounterToTimeKHR(XrInstance instance, long performanceCounter, long time)

Unsafe version of: ConvertWin32PerformanceCounterToTimeKHR

public static int
xrConvertTimeToWin32PerformanceCounterKHR(XrInstance
an XrInstance handle previously created with CreateInstance.
instance
,
long
an XrTime.
time
,
LARGE_INTEGER
the resulting Windows performance counter time stamp that is equivalent to the time.
performanceCounter
)

Convert XrTime to Win32 QueryPerformanceCounter time.

public static int
xrConvertWin32PerformanceCounterToTimeKHR(XrInstance
an XrInstance handle previously created with CreateInstance.
instance
,
LARGE_INTEGER
a time returned by QueryPerformanceCounter.
performanceCounter
,
LongBuffer
the resulting XrTime that is equivalent to the performanceCounter.
time
)

Convert Win32 QueryPerformanceCounter time to XrTime.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_KHR_WIN32_CONVERT_PERFORMANCE_COUNTER_TIME_EXTENSION_NAMEback to summary
public static final String XR_KHR_WIN32_CONVERT_PERFORMANCE_COUNTER_TIME_EXTENSION_NAME

The extension name.

XR_KHR_win32_convert_performance_counter_time_SPEC_VERSIONback to summary
public static final int XR_KHR_win32_convert_performance_counter_time_SPEC_VERSION

The extension specification version.

Constructor Detail

KHRWin32ConvertPerformanceCounterTimeback to summary
protected KHRWin32ConvertPerformanceCounterTime()

Method Detail

nxrConvertTimeToWin32PerformanceCounterKHRback to summary
public static int nxrConvertTimeToWin32PerformanceCounterKHR(XrInstance instance, long time, long performanceCounter)

Unsafe version of: ConvertTimeToWin32PerformanceCounterKHR

nxrConvertWin32PerformanceCounterToTimeKHRback to summary
public static int nxrConvertWin32PerformanceCounterToTimeKHR(XrInstance instance, long performanceCounter, long time)

Unsafe version of: ConvertWin32PerformanceCounterToTimeKHR

xrConvertTimeToWin32PerformanceCounterKHRback to summary
public static int xrConvertTimeToWin32PerformanceCounterKHR(XrInstance instance, long time, 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:XrInstance

an XrInstance handle previously created with CreateInstance.

time:long

an XrTime.

performanceCounter:LARGE_INTEGER

the resulting Windows performance counter time stamp that is equivalent to the time.

Annotations
@NativeType:XrResult
xrConvertWin32PerformanceCounterToTimeKHRback to summary
public static int xrConvertWin32PerformanceCounterToTimeKHR(XrInstance instance, 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:XrInstance

an XrInstance handle previously created with CreateInstance.

performanceCounter:LARGE_INTEGER

a time returned by QueryPerformanceCounter.

time:LongBuffer

the resulting XrTime that is equivalent to the performanceCounter.

Annotations
@NativeType:XrResult