C Specification

The XrSwapchainCreateInfo structure is defined as:

typedef struct XrSwapchainCreateInfo {
    XrStructureType             type;
    const void* XR_MAY_ALIAS    next;
    XrSwapchainCreateFlags      createFlags;
    XrSwapchainUsageFlags       usageFlags;
    int64_t                     format;
    uint32_t                    sampleCount;
    uint32_t                    width;
    uint32_t                    height;
    uint32_t                    faceCount;
    uint32_t                    arraySize;
    uint32_t                    mipCount;
} XrSwapchainCreateInfo;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to an extension-specific structure.

  • createFlags is a bitmask of XrSwapchainCreateFlagBits describing additional properties of the swapchain.

  • usageFlags is a bitmask of XrSwapchainUsageFlagBits describing the intended usage of the swapchain’s images. The usage flags define how the corresponding graphics API objects are created. A mismatch may result in swapchain images that do not support the application’s usage.

  • format is a graphics API-specific texture format identifier. For example, if the graphics API specified in xrCreateSession is Vulkan, then this format is a Vulkan format such as VK_FORMAT_R8G8B8A8_SRGB. The format identifies the format that the runtime will interpret the texture as upon submission. Valid formats are indicated by xrEnumerateSwapchainFormats.

  • sampleCount is the number of sub-data element samples in the image.

  • width is the width of the image.

  • height is the height of the image.

  • faceCount is the number of faces, which can be either 6 (for cubemaps) or 1.

  • arraySize is the number of array layers in the image.

  • mipCount describes the number of levels of detail available for minified sampling of the image.

Description

Valid Usage (Implicit)
  • type must be XR_TYPE_SWAPCHAIN_CREATE_INFO

  • next must be NULL

  • createFlags must be 0 or a valid combination of XrSwapchainCreateFlagBits values

  • usageFlags must be a valid combination of XrSwapchainUsageFlagBits values

  • usageFlags must not be 0

  • format must be a valid int64_t value

  • sampleCount must be a valid uint32_t value

  • width must be a valid uint32_t value

  • height must be a valid uint32_t value

  • faceCount must be a valid uint32_t value

  • arraySize must be a valid uint32_t value

  • mipCount must be a valid uint32_t value

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.