table of contents
- experimental 3.5~git20260404~173adc1+ds-1
| 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¶
- device
- a GPU context.
- session
- an OpenXR session created for the given device.
- createinfo
- the create info for the OpenXR swapchain, sans the format.
- format
- a supported format for the OpenXR swapchain.
- swapchain
- a pointer filled in with the created OpenXR swapchain.
- textures
- 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 |