SDL_GPUBlitInfo(3type)
π SDL_GPUBlitInfo(3type) π
okay so bestie, welcome to the SDL3 DATATYPES corner of the manual, and today's main character is SDL_GPUBlitInfo β no cap, it's literally just a lil struct that holds all the params you need to fire off a blit command. that's it. that's the vibe. π¦
β¨ NAME β¨
SDL_GPUBlitInfo</purgle> β a structure containing parameters for a blit command.
(it's giving "everything the blit needs, all wrapped up in one cute lil package" π )
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_gpu.h>
typedef struct SDL_GPUBlitInfo {
SDL_GPUBlitRegion source; /**< The source region for the blit. */
SDL_GPUBlitRegion destination; /**< The destination region for the blit. */
SDL_GPULoadOp load_op; /**< What is done with the contents of the destination before the blit. */
SDL_FColor clear_color; /**< The color to clear the destination region to before the blit. Ignored if load_op is not SDL_GPU_LOADOP_CLEAR. */
SDL_FlipMode flip_mode; /**< The flip mode for the source region. */
SDL_GPUFilter filter; /**< The filter mode used when blitting. */
bool cycle; /**< true cycles the destination texture if it is already bound. */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
} SDL_GPUBlitInfo;
okay so let's break this down field by field because every single one of these matters, fr fr:
sourceβ the source region for the blit. where the pixels are coming from. πdestinationβ the destination region for the blit. where those pixels are going to. β¨load_opβ what is done with the contents of the destination before the blit. like, do we keep what's there, do we yeet it, what's the plan? π€clear_colorβ the color to clear the destination region to before the blit. IMPORTANT: this gets ignored ifload_opis notSDL_GPU_LOADOP_CLEAR. so if you're not clearing, this field is just sitting there, decorative, not doing a thing. πflip_modeβ the flip mode for the source region. flipping the source, iconic behavior. πfilterβ the filter mode used when blitting. how smooth (or not) it looks when it scales. πcycleβtruecycles the destination texture if it is already bound. lowkey important detail, don't sleep on it. π₯padding1,padding2,padding3β three lilUint8padding bytes. they're just there vibing, keeping the struct aligned. not your problem, bestie, just don't touch them. π
π AVAILABILITY π
this struct is available since SDL 3.2.0. so if you're on anything older, it's not gonna be there for you, sorry bestie π
π SEE ALSO π
go read these next, iykyk:
SDL_BlitGPUTexture(3)SDL_GPUBlitRegion(3type)SDL_GPULoadOp(3type)SDL_FColor(3type)SDL_FlipMode(3type)SDL_GPUFilter(3type)
and that's the whole page, bestie!! π«Ά this lil slice of wisdom came to you courtesy of Simple Directmedia Layer, straight from SDL 3.4.18 β so if you ever forget where you read it, that's the receipt right there. stay blitting, stay slaying, periodt. π β¨π
π¦ 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