SDL_BlitGPUTexture(3)

πŸ’– SDL_BlitGPUTexture πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, where we're talking about SDL_BlitGPUTexture β€” she copies a region from one texture to another region of a texture, and she does it on the GPU, no cap. ✨


🌸 NAME 🌸

SDL_BlitGPUTexture β€” blits from a source texture region to a destination texture region. it's giving copy-paste but make it graphics card. πŸ¦‹


✨ SYNOPSIS ✨

#include <SDL3/SDL_gpu.h>

void SDL_BlitGPUTexture(
    SDL_GPUCommandBuffer *command_buffer,
    const SDL_GPUBlitInfo *info);

πŸ’… DESCRIPTION πŸ’…

so here's the tea, and it's a big one: this function must not be called inside of any pass. like, at all. ever. not in a render pass, not in a compute pass, not in a copy pass, none of them. calling it inside a pass is not the vibe and SDL will simply not be having it. 🚫


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • command_buffer β€” a command buffer. that's the thing you're recording all your GPU stuff into, mwah. πŸ’–
  • info β€” the blit info struct containing the blit parameters. all the details about what's going where live in here, she's the main character of this call. πŸ‘‘

🌈 AVAILABILITY 🌈

this one has been serving looks since SDL 3.2.0. if you're on anything older, sorry babe, she's not there yet. 😭


fr fr, the one thing to remember: not inside any pass. everything else is just filling out the struct and letting her cook. πŸ”₯

and that's the whole page, bestie!! this lil' slice of documentation came to you from Simple Directmedia Layer, SDL 3.4.18, and it's literally called SDL_BlitGPUTexture(3). go blit something iconic. πŸ«Άβœ¨πŸ’œ

πŸ“¦ where this page comes from