Creates an OpenXR swapchain.
Defined in <SDL3/SDL_openxr.h>
XrResult SDL_CreateGPUXRSwapchain(
SDL_GPUDevice *device,
XrSession session,
const XrSwapchainCreateInfo *createinfo,
SDL_GPUTextureFormat format,
XrSwapchain *swapchain,
SDL_GPUTexture ***textures);| SDL_GPUDevice * | device | a GPU context. |
| XrSession | session | an OpenXR session created for the given device. |
| const XrSwapchainCreateInfo * | createinfo | the create info for the OpenXR swapchain, sans the format. |
| SDL_GPUTextureFormat | format | a supported format for the OpenXR swapchain. |
| XrSwapchain * | swapchain | a pointer filled in with the created OpenXR swapchain. |
| SDL_GPUTexture *** | textures | a pointer filled in with the array of created swapchain images. |
(XrResult) Returns the result of the call.
The array returned via textures is sized according to xrEnumerateSwapchainImages, and thus should only be accessed via index values returned from xrAcquireSwapchainImage.
Applications are still allowed to call xrEnumerateSwapchainImages on the returned XrSwapchain if they need to get the exact size of the array.
This function is available since SDL 3.6.0.