SDL_GPULoadOp(3type)

πŸ’… SDL_GPULoadOp πŸ’…

okay bestie, welcome to the SDL3 DATATYPES corner of the manual, where today's main character is SDL_GPULoadOp πŸŽ€


✨ NAME ✨

SDL_GPULoadOp β€” tells you how the contents of a texture that's attached to a render pass get treated at the very beginning of that render pass. it's giving "what's the vibe of this texture when we walk in the door" πŸšͺ✨


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_gpu.h>

typedef enum SDL_GPULoadOp
{
    SDL_GPU_LOADOP_LOAD,      /**< The previous contents of the texture will be preserved. */
    SDL_GPU_LOADOP_CLEAR,     /**< The contents of the texture will be cleared to a color. */
    SDL_GPU_LOADOP_DONT_CARE  /**< The previous contents of the texture need not be preserved. The contents will be undefined. */
} SDL_GPULoadOp;

πŸ‘‘ the values, one by one πŸ‘‘

  • SDL_GPU_LOADOP_LOAD β€” the previous contents of the texture will be preserved. no notes, she keeps everything, she remembers 🫢
  • SDL_GPU_LOADOP_CLEAR β€” the contents of the texture will be cleared to a color. fresh start, clean slate, wipe the whiteboard 🧼✨
  • SDL_GPU_LOADOP_DONT_CARE β€” the previous contents of the texture need not be preserved. the contents will be undefined. so like, bestie, you literally do not know what's in there. it's a mystery box πŸ“¦ and you should not peek inside and assume anything, fr fr πŸ’€
ngl, SDL_GPU_LOADOP_DONT_CARE is the feral one. undefined means undefined. don't read it, don't trust it, don't build your whole render on it. periodt. πŸ’…

🌈 AVAILABILITY 🌈

this enum has been available since SDL 3.2.0. she's not new new, but she's not ancient either. iconic behavior honestly ⭐


πŸ¦‹ SEE ALSO πŸ¦‹


that's the whole page, bestie, you ate it πŸ’–

this little love letter comes from Simple Directmedia Layer, and the docs are sitting at SDL 3.4.18 β€” and yes the manual page is literally called SDL_GPULoadOp(3type), we stay on brand around here πŸŽ€βœ¨

πŸ“¦ where this page comes from