SDL_DRAWGPUPRIMITIVESINDIRECT(3)

✨ SDL_DrawGPUPrimitivesIndirect ✨

okay bestie, welcome to the SDL3 functions manual πŸ’– this one lives in the <SDL3/SDL_gpu.h> cinematic universe and it's literally called SDL_DrawGPUPrimitivesIndirect πŸ’…


🌸 NAME 🌸

SDL_DrawGPUPrimitivesIndirect β€” draws data using bound graphics state and with draw parameters set from a buffer πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_gpu.h>

void SDL_DrawGPUPrimitivesIndirect(
    SDL_GPURenderPass *render_pass,
    SDL_GPUBuffer *buffer,
    Uint32 offset,
    Uint32 draw_count);

no cap, that's the whole signature 🫢


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea, bestie β˜• the buffer has to consist of tightly-packed draw parameter sets, and each one of those sets has to match the layout of SDL_GPUIndirectDrawCommand ✨ like, exactly. no gaps, no extra padding, no freestyling πŸ™ˆ

and listen β€” you must NOT call this function before binding a graphics pipeline. fr fr. bind that pipeline first or it's giving chaos πŸ’€

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • render_pass β€” a render pass handle 🌈
  • buffer β€” a buffer containing draw parameters πŸ“
  • offset β€” the offset to start reading from the draw buffer πŸ“
  • draw_count β€” the number of draw parameter sets that should be read from the draw buffer πŸ”’

πŸ‘‘ AVAILABILITY πŸ‘‘

this icon is available since SDL 3.2.0 ⭐ so if you're on anything older... bestie, upgrade 😭


and that's the whole vibe check βœ… go forth and draw those primitives indirectly, you absolute main character πŸ‘‘

Simple Directmedia Layer 🌈 SDL 3.4.18 🌸 β€” mwah, sending this one off with a kiss, catch you in the next manpage bestie πŸ’–πŸ¦‹πŸ’…

πŸ“¦ where this page comes from