Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class FBDisplayRefreshRate

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

The XR_FB_display_refresh_rate extension.

On platforms which support dynamically adjusting the display refresh rate, application developers may request a specific display refresh rate in order to improve the overall user experience, examples include:

This extension allows:

In order to enable the functionality of this extension, the application must pass the name of the extension into CreateInstance via the XrInstanceCreateInfo::enabledExtensionNames parameter as indicated in the extensions section.

Field Summary

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

The extension specification version.

public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nxrEnumerateDisplayRefreshRatesFB(XrSession session, int
the capacity of the displayRefreshRates, or 0 to retrieve the required capacity.
displayRefreshRateCapacityInput
,
long displayRefreshRateCountOutput, long displayRefreshRates)

Unsafe version of: EnumerateDisplayRefreshRatesFB

public static int
nxrGetDisplayRefreshRateFB(XrSession session, long displayRefreshRate)

Unsafe version of: GetDisplayRefreshRateFB

public static int
xrEnumerateDisplayRefreshRatesFB(XrSession
the session that enumerates the supported display refresh rates.
session
,
IntBuffer
a pointer to the count of float displayRefreshRates written, or a pointer to the required capacity in the case that displayRefreshRateCapacityInput is insufficient.
displayRefreshRateCountOutput
,
FloatBuffer
a pointer to an array of float display refresh rates, but can be NULL if displayRefreshRateCapacityInput is 0.
displayRefreshRates
)

Enumerates display refresh rates.

public static int
xrGetDisplayRefreshRateFB(XrSession
the XrSession to query.
session
,
FloatBuffer
a pointer to a float into which the current display refresh rate will be placed.
displayRefreshRate
)

Get the current display refresh rate.

public static int
xrRequestDisplayRefreshRateFB(XrSession
a valid XrSession handle.
session
,
float
0.0f or a supported display refresh rate. Supported display refresh rates are indicated by EnumerateDisplayRefreshRatesFB.
displayRefreshRate
)

Request a display refresh rate.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FBback to summary
public static final int XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB

Extends XrResult.

XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAMEback to summary
public static final String XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME

The extension name.

XR_FB_display_refresh_rate_SPEC_VERSIONback to summary
public static final int XR_FB_display_refresh_rate_SPEC_VERSION

The extension specification version.

XR_TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FBback to summary
public static final int XR_TYPE_EVENT_DATA_DISPLAY_REFRESH_RATE_CHANGED_FB

Extends XrStructureType.

Constructor Detail

FBDisplayRefreshRateback to summary
protected FBDisplayRefreshRate()

Method Detail

nxrEnumerateDisplayRefreshRatesFBback to summary
public static int nxrEnumerateDisplayRefreshRatesFB(XrSession session, int displayRefreshRateCapacityInput, long displayRefreshRateCountOutput, long displayRefreshRates)

Unsafe version of: EnumerateDisplayRefreshRatesFB

Parameters
displayRefreshRateCapacityInput:int

the capacity of the displayRefreshRates, or 0 to retrieve the required capacity.

nxrGetDisplayRefreshRateFBback to summary
public static int nxrGetDisplayRefreshRateFB(XrSession session, long displayRefreshRate)

Unsafe version of: GetDisplayRefreshRateFB

xrEnumerateDisplayRefreshRatesFBback to summary
public static int xrEnumerateDisplayRefreshRatesFB(XrSession session, IntBuffer displayRefreshRateCountOutput, FloatBuffer displayRefreshRates)

Enumerates display refresh rates.

C Specification

The EnumerateDisplayRefreshRatesFB function is defined as:


XrResult xrEnumerateDisplayRefreshRatesFB(
    XrSession                                   session,
    uint32_t                                    displayRefreshRateCapacityInput,
    uint32_t*                                   displayRefreshRateCountOutput,
    float*                                      displayRefreshRates);
Description

EnumerateDisplayRefreshRatesFB enumerates the display refresh rates supported by the current session. Display refresh rates must be in order from lowest to highest supported display refresh rates. Runtimes must always return identical buffer contents from this enumeration for the lifetime of the session.

Valid Usage (Implicit)
  • The XR_FB_display_refresh_rate extension must be enabled prior to calling EnumerateDisplayRefreshRatesFB
  • session must be a valid XrSession handle
  • displayRefreshRateCountOutput must be a pointer to a uint32_t value
  • If displayRefreshRateCapacityInput is not 0, displayRefreshRates must be a pointer to an array of displayRefreshRateCapacityInput float values
Return Codes
On success, this command returns
On failure, this command returns
See Also

GetDisplayRefreshRateFB, RequestDisplayRefreshRateFB

Parameters
session:XrSession

the session that enumerates the supported display refresh rates.

displayRefreshRateCountOutput:IntBuffer

a pointer to the count of float displayRefreshRates written, or a pointer to the required capacity in the case that displayRefreshRateCapacityInput is insufficient.

displayRefreshRates:FloatBuffer

a pointer to an array of float display refresh rates, but can be NULL if displayRefreshRateCapacityInput is 0.

Annotations
@NativeType:XrResult
xrGetDisplayRefreshRateFBback to summary
public static int xrGetDisplayRefreshRateFB(XrSession session, FloatBuffer displayRefreshRate)

Get the current display refresh rate.

C Specification

The GetDisplayRefreshRateFB function is defined as:


XrResult xrGetDisplayRefreshRateFB(
    XrSession                                   session,
    float*                                      displayRefreshRate);
Description

GetDisplayRefreshRateFB retrieves the current display refresh rate.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

EnumerateDisplayRefreshRatesFB, RequestDisplayRefreshRateFB

Parameters
session:XrSession

the XrSession to query.

displayRefreshRate:FloatBuffer

a pointer to a float into which the current display refresh rate will be placed.

Annotations
@NativeType:XrResult
xrRequestDisplayRefreshRateFBback to summary
public static int xrRequestDisplayRefreshRateFB(XrSession session, float displayRefreshRate)

Request a display refresh rate.

C Specification

The RequestDisplayRefreshRateFB function is defined as:


XrResult xrRequestDisplayRefreshRateFB(
    XrSession                                   session,
    float                                       displayRefreshRate);
Description

RequestDisplayRefreshRateFB provides a mechanism for an application to request the system to dynamically change the display refresh rate to the application preferred value. The runtime must return ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB if displayRefreshRate is not either 0.0f or one of the values enumerated by EnumerateDisplayRefreshRatesFB. A display refresh rate of 0.0f indicates the application has no preference.

Note that this is only a request and does not guarantee the system will switch to the requested display refresh rate.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

EnumerateDisplayRefreshRatesFB, GetDisplayRefreshRateFB

Parameters
session:XrSession

a valid XrSession handle.

displayRefreshRate:float

0.0f or a supported display refresh rate. Supported display refresh rates are indicated by EnumerateDisplayRefreshRatesFB.

Annotations
@NativeType:XrResult