---
name: "SDL_CreateGPUTransferBuffer"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_CreateGPUTransferBuffer"
---

# SDL\_CreateGPUTransferBuffer(3)

Creates a transfer buffer to be used when uploading to or downloading from graphics resources.

## NAME

SDL\_CreateGPUTransferBuffer - Creates a transfer buffer to be used when uploading to or downloading from graphics resources.

## HEADER FILE

Defined in SDL3/SDL\_gpu.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_GPUTransferBuffer \* SDL\_CreateGPUTransferBuffer(**     **SDL\_GPUDevice \*device,**     **const SDL\_GPUTransferBufferCreateInfo \*createinfo);**

## DESCRIPTION

Download buffers can be particularly expensive to create, so it is good practice to reuse them if data will be downloaded regularly.

There are optional properties that can be provided through **props** . These are the supported properties:

•  **SDL\_PROP\_GPU\_TRANSFERBUFFER\_CREATE\_NAME\_STRING** :\
   a name that can be displayed in debugging tools.

## FUNCTION PARAMETERS

- *device*

  a GPU Context.

- *createinfo*

  a struct describing the state of the transfer buffer to create.

## RETURN VALUE

( **SDL\_GPUTransferBuffer**\
  \*) Returns a transfer buffer on success, or NULL on failure; call  **SDL\_GetError** () for more information.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_UploadToGPUBuffer**(3)](/SDL_UploadToGPUBuffer/3.md), **•**(3), [**SDL\_DownloadFromGPUBuffer**(3)](/SDL_DownloadFromGPUBuffer/3.md), **•**(3), [**SDL\_UploadToGPUTexture**(3)](/SDL_UploadToGPUTexture/3.md), **•**(3), [**SDL\_DownloadFromGPUTexture**(3)](/SDL_DownloadFromGPUTexture/3.md), **•**(3), [**SDL\_ReleaseGPUTransferBuffer**(3)](/SDL_ReleaseGPUTransferBuffer/3.md)
