sdlCreateGpuTransferBuffer function
Pointer<SdlGpuTransferBuffer>
sdlCreateGpuTransferBuffer(
- Pointer<
SdlGpuDevice> device, - Pointer<
SdlGpuTransferBufferCreateInfo> createinfo
Creates a transfer buffer to be used when uploading to or downloading from graphics resources.
Download buffers can be particularly expensive to create, so it is good practice to reuse them if data will be downloaded regularly.
\param device a GPU Context. \param createinfo a struct describing the state of the transfer buffer to create. \returns a transfer buffer on success, or NULL on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.1.3.
\sa SDL_UploadToGPUBuffer \sa SDL_DownloadFromGPUBuffer \sa SDL_UploadToGPUTexture \sa SDL_DownloadFromGPUTexture \sa SDL_ReleaseGPUTransferBuffer
extern SDL_DECLSPEC SDL_GPUTransferBuffer *SDLCALL SDL_CreateGPUTransferBuffer( SDL_GPUDevice *device, const SDL_GPUTransferBufferCreateInfo *createinfo)
Implementation
Pointer<SdlGpuTransferBuffer> sdlCreateGpuTransferBuffer(
Pointer<SdlGpuDevice> device,
Pointer<SdlGpuTransferBufferCreateInfo> createinfo) {
final sdlCreateGpuTransferBufferLookupFunction = libSdl3.lookupFunction<
Pointer<SdlGpuTransferBuffer> Function(Pointer<SdlGpuDevice> device,
Pointer<SdlGpuTransferBufferCreateInfo> createinfo),
Pointer<SdlGpuTransferBuffer> Function(Pointer<SdlGpuDevice> device,
Pointer<SdlGpuTransferBufferCreateInfo> createinfo)>(
'SDL_CreateGPUTransferBuffer');
return sdlCreateGpuTransferBufferLookupFunction(device, createinfo);
}