SDL Wiki
[ front page | index | search | recent changes | git repo | offline html ]

SDL_GetGPUXRSwapchainFormats

Queries the GPU device for supported XR swapchain image formats.

Header File

Defined in <SDL3/SDL_openxr.h>

Syntax

SDL_GPUTextureFormat * SDL_GetGPUXRSwapchainFormats(SDL_GPUDevice *device, XrSession session, int *num_formats);

Function Parameters

SDL_GPUDevice * device a GPU context.
XrSession session an OpenXR session created for the given device.
int * num_formats a pointer filled with the number of supported XR swapchain formats.

Return Value

(SDL_GPUTextureFormat *) Returns a 0 terminated array of supported formats or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.

Remarks

The returned pointer should be allocated with SDL_malloc() and will be passed to SDL_free().

Version

This function is available since SDL 3.6.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryOpenxr


[ edit | delete | history | feedback | raw ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.