Class FBColorSpace

java.lang.Object
org.lwjgl.openxr.FBColorSpace

public class FBColorSpace extends Object
The XR_FB_color_space extension.

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 Details

    • XR_FB_color_space_SPEC_VERSION

      public static final int XR_FB_color_space_SPEC_VERSION
      The extension specification version.
      See Also:
    • XR_FB_COLOR_SPACE_EXTENSION_NAME

      public static final String 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_FB
      Extends XrStructureType.
      See Also:
    • XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB

      public static final int XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB
      Extends XrResult.
      See Also:
    • XR_COLOR_SPACE_UNMANAGED_FB

      public static final int XR_COLOR_SPACE_UNMANAGED_FB
      XrColorSpaceFB - Color Space Type
      Enumerant 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_FB
      XrColorSpaceFB - Color Space Type
      Enumerant 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_FB
      XrColorSpaceFB - Color Space Type
      Enumerant 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_FB
      XrColorSpaceFB - Color Space Type
      Enumerant 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_FB
      XrColorSpaceFB - Color Space Type
      Enumerant 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_FB
      XrColorSpaceFB - Color Space Type
      Enumerant 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_FB
      XrColorSpaceFB - Color Space Type
      Enumerant 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_FB
      XrColorSpaceFB - Color Space Type
      Enumerant 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 the colorSpaces array, 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 EnumerateColorSpacesFB function is defined as:

      
       XrResult xrEnumerateColorSpacesFB(
           XrSession                                   session,
           uint32_t                                    colorSpaceCapacityInput,
           uint32_t*                                   colorSpaceCountOutput,
           XrColorSpaceFB*                             colorSpaces);
      Description

      EnumerateColorSpacesFB enumerates 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_space extension must be enabled prior to calling EnumerateColorSpacesFB
      • session must be a valid XrSession handle
      • colorSpaceCountOutput must be a pointer to a uint32_t value
      • If colorSpaceCapacityInput is not 0, colorSpaces must be a pointer to an array of colorSpaceCapacityInput XrColorSpaceFB values
      Return Codes
      On success, this command returns
      On failure, this command returns
      See Also

      SetColorSpaceFB

      Parameters:
      session - the session that enumerates the supported color spaces.
      colorSpaceCountOutput - a pointer to the count of XrColorSpaceFB colorSpaces written, or a pointer to the required capacity in the case that colorSpaceCapacityInput is insufficient.
      colorSpaces - a pointer to an array of XrColorSpaceFB color spaces, but can be NULL if colorSpaceCapacityInput is 0.
    • xrSetColorSpaceFB

      public static int xrSetColorSpaceFB(XrSession session, int colorSpace)
      Set a color space.
      C Specification

      The SetColorSpaceFB function is defined as:

      
       XrResult xrSetColorSpaceFB(
           XrSession                                   session,
           XrColorSpaceFB                              colorSpace);
      Description

      SetColorSpaceFB provides 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 to COLOR_SPACE_RIFT_CV1_FB. The runtime must return ERROR_COLOR_SPACE_UNSUPPORTED_FB if colorSpace is not one of the values enumerated by EnumerateColorSpacesFB.

      Formal definitions of color spaces contain a number of aspects such as gamma correction, max luminance and more. However, SetColorSpaceFB will only affect the color gamut of the output by transforming the color gamut from the source (defined by the colorSpace parameter) 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_space extension must be enabled prior to calling SetColorSpaceFB
      • session must be a valid XrSession handle
      • colorSpace must be a valid XrColorSpaceFB value
      Return Codes
      On success, this command returns
      On failure, this command returns
      See Also

      EnumerateColorSpacesFB

      Parameters:
      session - a valid XrSession handle.
      colorSpace - a supported color space. Supported color spaces are indicated by EnumerateColorSpacesFB.