sdlCreateGpuxrSwapchain function openxr
- Pointer<
SdlGpuDevice> device, - int session,
- Pointer<
XrSwapchainCreateInfo> createinfo, - int format,
- Pointer<
Uint64> swapchain, - Pointer<
Pointer< textures,Pointer< >SdlGpuTexture> >
Creates an OpenXR swapchain.
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.
\param device a GPU context. \param session an OpenXR session created for the given device. \param createinfo the create info for the OpenXR swapchain, sans the format. \param format a supported format for the OpenXR swapchain. \param swapchain a pointer filled in with the created OpenXR swapchain. \param textures a pointer filled in with the array of created swapchain images. \returns the result of the call.
\since This function is available since SDL 3.6.0.
\sa SDL_CreateGPUDeviceWithProperties \sa SDL_CreateGPUXRSession \sa SDL_GetGPUXRSwapchainFormats \sa SDL_DestroyGPUXRSwapchain
extern SDL_DECLSPEC XrResult SDLCALL SDL_CreateGPUXRSwapchain( SDL_GPUDevice *device, XrSession session, const XrSwapchainCreateInfo *createinfo, SDL_GPUTextureFormat format, XrSwapchain *swapchain, SDL_GPUTexture ***textures)
Implementation
int sdlCreateGpuxrSwapchain(
Pointer<SdlGpuDevice> device,
int session,
Pointer<XrSwapchainCreateInfo> createinfo,
int format,
Pointer<Uint64> swapchain,
Pointer<Pointer<Pointer<SdlGpuTexture>>> textures,
) {
final sdlCreateGpuxrSwapchainLookupFunction = _libSdl
.lookupFunction<
Int32 Function(
Pointer<SdlGpuDevice> device,
Uint64 session,
Pointer<XrSwapchainCreateInfo> createinfo,
Int32 format,
Pointer<Uint64> swapchain,
Pointer<Pointer<Pointer<SdlGpuTexture>>> textures,
),
int Function(
Pointer<SdlGpuDevice> device,
int session,
Pointer<XrSwapchainCreateInfo> createinfo,
int format,
Pointer<Uint64> swapchain,
Pointer<Pointer<Pointer<SdlGpuTexture>>> textures,
)
>('SDL_CreateGPUXRSwapchain');
return sdlCreateGpuxrSwapchainLookupFunction(
device,
session,
createinfo,
format,
swapchain,
textures,
);
}