Class FBColorSpace
- java.lang.Object
-
- org.lwjgl.openxr.FBColorSpace
-
public class FBColorSpace extends java.lang.ObjectThe FB_color_space extension.
-
-
Field Summary
Fields Modifier and Type Field Description static intXR_COLOR_SPACE_ADOBE_RGB_FB
XR_COLOR_SPACE_P3_FB
XR_COLOR_SPACE_QUEST_FB
XR_COLOR_SPACE_REC2020_FB
XR_COLOR_SPACE_REC709_FB
XR_COLOR_SPACE_RIFT_CV1_FB
XR_COLOR_SPACE_RIFT_S_FB
XR_COLOR_SPACE_UNMANAGED_FBXrColorSpaceFB - Color Space Typestatic intXR_ERROR_COLOR_SPACE_UNSUPPORTED_FBExtendsXrResult.static java.lang.StringXR_FB_COLOR_SPACE_EXTENSION_NAMEThe extension name.static intXR_FB_color_space_SPEC_VERSIONThe extension specification version.static intXR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FBExtendsXrStructureType.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnxrEnumerateColorSpacesFB(XrSession session, int colorSpaceCapacityInput, long colorSpaceCountOutput, long colorSpaces)Unsafe version of:EnumerateColorSpacesFBstatic intxrEnumerateColorSpacesFB(XrSession session, java.nio.IntBuffer colorSpaceCountOutput, java.nio.IntBuffer colorSpaces)Enumerates color spaces.static intxrSetColorSpaceFB(XrSession session, int colorSpace)Set a color space.
-
-
-
Field Detail
-
XR_FB_color_space_SPEC_VERSION
The extension specification version.
-
XR_FB_COLOR_SPACE_EXTENSION_NAME
The extension name.
-
XR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB
ExtendsXrStructureType.
-
XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB
ExtendsXrResult.
-
XR_COLOR_SPACE_UNMANAGED_FB, XR_COLOR_SPACE_REC2020_FB, XR_COLOR_SPACE_REC709_FB, XR_COLOR_SPACE_RIFT_CV1_FB, XR_COLOR_SPACE_RIFT_S_FB, XR_COLOR_SPACE_QUEST_FB, XR_COLOR_SPACE_P3_FB, XR_COLOR_SPACE_ADOBE_RGB_FB
XrColorSpaceFB - Color Space TypeEnumerant Descriptions
COLOR_SPACE_UNMANAGED_FB. No color correction, not recommended for production use.COLOR_SPACE_REC2020_FB. Standard Rec. 2020 chromacities with D65 white point.COLOR_SPACE_REC709_FB. Standard Rec. 709 chromaticities, similar to sRGB.COLOR_SPACE_RIFT_CV1_FB. Unique color space, between P3 and Adobe RGB using D75 white point. This is the preferred color space for standardized color across all Oculus HMDs. Color Space Details with Chromacity Primaries in CIE 1931 xy:- Red: (0.666, 0.334)
- Green: (0.238, 0.714)
- Blue: (0.139, 0.053)
- White: (0.298, 0.318)
COLOR_SPACE_RIFT_S_FB. Unique color space. Similar to Rec 709 using D75. Color Space Details with Chromacity Primaries in CIE 1931 xy:- Red: (0.640, 0.330)
- Green: (0.292, 0.586)
- Blue: (0.156, 0.058)
- White: (0.298, 0.318)
COLOR_SPACE_QUEST_FB. Unique color space. Similar to Rift CV1 using D75 white point Color Space Details with Chromacity Primaries in CIE 1931 xy:- Red: (0.661, 0.338)
- Green: (0.228, 0.718)
- Blue: (0.142, 0.042)
- White: (0.298, 0.318)
COLOR_SPACE_P3_FB. Similar to DCI-P3, but uses D65 white point instead. Color Space Details with Chromacity Primaries in CIE 1931 xy:- Red: (0.680, 0.320)
- Green: (0.265, 0.690)
- Blue: (0.150, 0.060)
- White: (0.313, 0.329)
COLOR_SPACE_ADOBE_RGB_FB. Standard Adobe chromacities.
See Also
XrSystemColorSpacePropertiesFB,EnumerateColorSpacesFB,SetColorSpaceFB
-
-
Method Detail
-
nxrEnumerateColorSpacesFB
public static int nxrEnumerateColorSpacesFB(XrSession session, int colorSpaceCapacityInput, long colorSpaceCountOutput, long colorSpaces)
Unsafe version of:EnumerateColorSpacesFB- Parameters:
colorSpaceCapacityInput- the capacity of thecolorSpacesarray, or 0 to retrieve the required capacity.
-
xrEnumerateColorSpacesFB
public static int xrEnumerateColorSpacesFB(XrSession session, java.nio.IntBuffer colorSpaceCountOutput, @Nullable java.nio.IntBuffer colorSpaces)
Enumerates color spaces.C Specification
The
EnumerateColorSpacesFBfunction is defined as:XrResult xrEnumerateColorSpacesFB( XrSession session, uint32_t colorSpaceCapacityInput, uint32_t* colorSpaceCountOutput, XrColorSpaceFB* colorSpaces);Description
EnumerateColorSpacesFBenumerates the color spaces supported by the current session. Runtimes must always return identical buffer contents from this enumeration for the lifetime of the session.Valid Usage (Implicit)
- The
XR_FB_color_spaceextension must be enabled prior to callingEnumerateColorSpacesFB sessionmust be a validXrSessionhandlecolorSpaceCountOutputmust be a pointer to auint32_tvalue- If
colorSpaceCapacityInputis not 0,colorSpacesmust be a pointer to an array ofcolorSpaceCapacityInputXrColorSpaceFBvalues
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- the session that enumerates the supported color spaces.colorSpaceCountOutput- a pointer to the count ofXrColorSpaceFBcolorSpaceswritten, or a pointer to the required capacity in the case thatcolorSpaceCapacityInputis 0.colorSpaces- a pointer to an array ofXrColorSpaceFBcolor spaces, but can beNULLifcolorSpaceCapacityInputis 0.
- The
-
xrSetColorSpaceFB
public static int xrSetColorSpaceFB(XrSession session, int colorSpace)
Set a color space.C Specification
The
SetColorSpaceFBfunction is defined as:XrResult xrSetColorSpaceFB( XrSession session, XrColorSpaceFB colorSpace);Description
SetColorSpaceFBprovides a mechanism for an application to specify the color space used in the final rendered frame. If this function is not called, the session will use the color space deemed appropriate by the runtime. Oculus HMDs for both PC and Mobile product lines default toCOLOR_SPACE_RIFT_CV1_FB. The runtime must returnERROR_COLOR_SPACE_UNSUPPORTED_FBifcolorSpaceis not one of the values enumerated byEnumerateColorSpacesFB.Formal definitions of color spaces contain a number of aspects such as gamma correction, max luminance and more. However,
SetColorSpaceFBwill only affect the color gamut of the output by transforming the color gamut from the source (defined by thecolorSpaceparameter) to the HMD display’s color gamut (defined by the hardware internally). This call will not affect gamma correction, leaving that to follow the GPU texture format standards. Luminance, tonemapping, and other aspects of the color space will also remain unaffected.For more info on color management in Oculus HMDs, please refer to this guide: Color Management in Oculus Headsets
Valid Usage (Implicit)
- The
XR_FB_color_spaceextension must be enabled prior to callingSetColorSpaceFB sessionmust be a validXrSessionhandlecolorSpacemust be a validXrColorSpaceFBvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a validXrSessionhandle.colorSpace- a supported color space. Supported color spaces are indicated byEnumerateColorSpacesFB.
- The
-
-