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 π¦
SDL_BeginGPURenderPass(3)β this is where all the load-op magic actually gets used, iykyk π₯
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
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms