// Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/XR_FB_foveation_configuration.adoc[]

*Contributors*::
    Kevin Xiao, Facebook +
    Ross Ning, Facebook +
    Remi Palandri, Facebook +
    Cass Everitt, Facebook +
    Gloria Kennickell, Facebook


*Overview*

On Facebook HMDs, developers may: create foveation profiles generated by the
runtime for the optical properties and performance profile of the specific
HMD.

This extension allows:

* An application to request foveation profiles generated by the runtime for
  the current HMD.

In order to enable the functionality of this extension, you must: pass the
name of the extension into flink:xrCreateInstance via the
slink:XrInstanceCreateInfo pname:enabledExtensionNames parameter as
indicated in the <<fundamentals-extensions>> section.

*New Object Types*

*New Flag Types*

*New Enum Constants*

elink:XrStructureType enumeration is extended with:

* ename:XR_TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB

*New Enums*

[open,refpage='XrFoveationLevelFB',desc='Foveation levels',type='enums']
--
The possible foveation levels are specified by the elink:XrFoveationLevelFB
enumeration:

include::{generated}/api/enums/XrFoveationLevelFB.adoc[]

include::{generated}/api/enums/XrFoveationLevelFB.comments-box.adoc[]

--

[open,refpage='XrFoveationDynamicFB',desc='Dynamic foveation settings',type='enums']
--
The possible foveation levels are specified by the
elink:XrFoveationDynamicFB enumeration:

include::{generated}/api/enums/XrFoveationDynamicFB.adoc[]

include::{generated}/api/enums/XrFoveationDynamicFB.comments-box.adoc[]

--

*New Structures*

[open,refpage='XrFoveationLevelProfileCreateInfoFB',type='structs',desc='The information to create a foveation profile for foveation levels',xrefs='']
--

slink:XrFoveationLevelProfileCreateInfoFB can: be provided in the pname:next
chain of slink:XrFoveationProfileCreateInfoFB when calling
flink:xrCreateFoveationProfileFB.
The runtime must: interpret slink:XrSwapchainCreateInfoFoveationFB with
slink:XrFoveationLevelProfileCreateInfoFB in its pname:next chain as a
request to create a foveation profile that will apply a fixed foveation
pattern according to the parameters defined in the
slink:XrFoveationLevelProfileCreateInfoFB.

The slink:XrFoveationLevelProfileCreateInfoFB structure is defined as:

include::{generated}/api/structs/XrFoveationLevelProfileCreateInfoFB.adoc[]

.Member Descriptions
****
* pname:type is the elink:XrStructureType of this structure.
* pname:next is code:NULL or a pointer to the next structure in a structure
  chain.
  No such structures are defined in core OpenXR or this extension.
* pname:level is the maximum desired foveation level.
* pname:verticalOffset is the desired vertical offset in degrees for the
  center of the foveation pattern.
* pname:dynamic is the desired dynamic foveation setting.
****

include::{generated}/validity/structs/XrFoveationLevelProfileCreateInfoFB.adoc[]
--

*New Functions*

*Issues*

*Version History*

* Revision 1, 2021-05-13 (Kevin Xiao)
** Initial extension description
