Scroll to navigation

SDL_CreateGPUXRSwapchain(3) SDL3 FUNCTIONS SDL_CreateGPUXRSwapchain(3)

NAME

SDL_CreateGPUXRSwapchain - Creates an OpenXR swapchain.

SYNOPSIS

#include <SDL3/SDL_openxr.h>
XrResult SDL_CreateGPUXRSwapchain(
    SDL_GPUDevice *device,
    XrSession session,
    const XrSwapchainCreateInfo *createinfo, 
    SDL_GPUTextureFormat format,
    XrSwapchain *swapchain,
    SDL_GPUTexture ***textures);

DESCRIPTION

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.

FUNCTION PARAMETERS

a GPU context.
an OpenXR session created for the given device.
the create info for the OpenXR swapchain, sans the format.
a supported format for the OpenXR swapchain.
a pointer filled in with the created OpenXR swapchain.
a pointer filled in with the array of created swapchain images.

RETURN VALUE

Returns the result of the call.

AVAILABILITY

This function is available since SDL 3.6.0.

SEE ALSO

SDL_CreateGPUDeviceWithProperties(3), SDL_CreateGPUXRSession(3), SDL_GetGPUXRSwapchainFormats(3), SDL_DestroyGPUXRSwapchain(3)

SDL 3.5.0 Simple Directmedia Layer