SDL_GPUTra...rCreateInfo(3type)

πŸ’– SDL_GPUTransferBufferCreateInfo πŸ’–

okay bestie, welcome to the SDL3 DATATYPES corner of the manual, page SDL_GPUTra...rCreateInfo(3type) β€” yes the header truncates it like that, no we are not okay about it, moving on πŸ’…


🌸 NAME 🌸

SDL_GPUTransferBufferCreateInfo β€” it's the struct that holds all the deets you gotta specify when you're making a transfer buffer. that's it, that's the whole job. main character energy, honestly. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_gpu.h>

typedef struct SDL_GPUTransferBufferCreateInfo
{
    SDL_GPUTransferBufferUsage usage;  /**< How the transfer buffer is intended to be used by the client. */
    Uint32 size;                       /**< The size in bytes of the transfer buffer. */

    SDL_PropertiesID props;            /**< A properties ID for extensions. Should be 0 if no extensions are needed. */
} SDL_GPUTransferBufferCreateInfo;

✨ DESCRIPTION ✨ (well, the field breakdown)

so like, the manpage doesn't hand you a big description section, it just yells at you from inside the comments, so here's the vibe check on every single member, no skips, no cap:

  • usage β€” a SDL_GPUTransferBufferUsage. this is where you tell SDL how the client is intending to use this transfer buffer. it's giving "state your intentions before entering" 🫢
  • size β€” a Uint32, the size in bytes of the transfer buffer. yes bytes. always bytes. we measure in bytes here. πŸ“
  • props β€” a SDL_PropertiesID, the little hook for extensions. and listen: it should be 0 if you don't need any extensions. don't be doing the most for no reason, bestie πŸ™ˆ
not me having to say this but β€” these are struct fields, not options, so there's literally nothing to "pass" at runtime. you fill the struct, you hand it over. periodt. πŸ’…

πŸ‘‘ AVAILABILITY πŸ‘‘

this struct has been around since SDL 3.2.0. so if you're on anything older, that's a you problem, and by "you problem" i mean it doesn't exist yet 😭


🌈 SEE ALSO 🌈

  • SDL_CreateGPUTransferBuffer(3) β€” the function that actually takes this struct and does something with it. iconic behavior. go read it next, fr fr πŸ”₯

okay that's the whole page, you ate it up, i'm obsessed πŸ’œ this little gem came to you courtesy of Simple Directmedia Layer, version SDL 3.4.18 β€” that's the source and the version, so now you know exactly which era of SDL this lore is from. go make a transfer buffer, you got this πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from