Class FBColorSpace
XR devices may use a color space that is different from many monitors used in development. Application developers may desire to specify the color space in which they have authored their application so appropriate colors are shown when the application is running on the XR device.
This extension allows:
- An application to get the native color space of the XR device.
- An application to enumerate the supported color spaces for the session.
- An application to set the color space for the session.
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 extension section.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intXrColorSpaceFB - Color Space Typestatic final intXrColorSpaceFB - Color Space Typestatic final intXrColorSpaceFB - Color Space Typestatic final intXrColorSpaceFB - Color Space Typestatic final intXrColorSpaceFB - Color Space Typestatic final intXrColorSpaceFB - Color Space Typestatic final intXrColorSpaceFB - Color Space Typestatic final intXrColorSpaceFB - Color Space Typestatic final intExtendsXrResult.static final StringThe extension name.static final intThe extension specification version.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrEnumerateColorSpacesFB(XrSession session, int colorSpaceCapacityInput, long colorSpaceCountOutput, long colorSpaces) Unsafe version of:EnumerateColorSpacesFBstatic intxrEnumerateColorSpacesFB(XrSession session, IntBuffer colorSpaceCountOutput, @Nullable IntBuffer colorSpaces) Enumerates color spaces.static intxrSetColorSpaceFB(XrSession session, int colorSpace) Set a color space.
-
Field Details
-
XR_FB_color_space_SPEC_VERSION
public static final int XR_FB_color_space_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_FB_COLOR_SPACE_EXTENSION_NAME
The extension name.- See Also:
-
XR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FB
public static final int XR_TYPE_SYSTEM_COLOR_SPACE_PROPERTIES_FBExtendsXrStructureType.- See Also:
-
XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB
public static final int XR_ERROR_COLOR_SPACE_UNSUPPORTED_FBExtendsXrResult.- See Also:
-
XR_COLOR_SPACE_UNMANAGED_FB
public static final int XR_COLOR_SPACE_UNMANAGED_FBXrColorSpaceFB - 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- See Also:
-
XR_COLOR_SPACE_REC2020_FB
public static final int XR_COLOR_SPACE_REC2020_FBXrColorSpaceFB - 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- See Also:
-
XR_COLOR_SPACE_REC709_FB
public static final int XR_COLOR_SPACE_REC709_FBXrColorSpaceFB - 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- See Also:
-
XR_COLOR_SPACE_RIFT_CV1_FB
public static final int XR_COLOR_SPACE_RIFT_CV1_FBXrColorSpaceFB - 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- See Also:
-
XR_COLOR_SPACE_RIFT_S_FB
public static final int XR_COLOR_SPACE_RIFT_S_FBXrColorSpaceFB - 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- See Also:
-
XR_COLOR_SPACE_QUEST_FB
public static final int XR_COLOR_SPACE_QUEST_FBXrColorSpaceFB - 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- See Also:
-
XR_COLOR_SPACE_P3_FB
public static final int XR_COLOR_SPACE_P3_FBXrColorSpaceFB - 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- See Also:
-
XR_COLOR_SPACE_ADOBE_RGB_FB
public static final int XR_COLOR_SPACE_ADOBE_RGB_FBXrColorSpaceFB - 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- See Also:
-
-
Method Details
-
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, IntBuffer colorSpaceCountOutput, @Nullable 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 insufficient.colorSpaces- a pointer to an array ofXrColorSpaceFBcolor spaces, but can beNULLifcolorSpaceCapacityInputis 0.
- The
-
xrSetColorSpaceFB
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
-