SDL_CREATEGPUGRAPHICSPIPELINE(3)

πŸ’… SDL_CreateGPUGraphicsPipeline

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one is literally called SDL_CreateGPUGraphicsPipeline and it's about to make your whole graphics workflow pop off ✨

🌸 NAME 🌸

SDL_CreateGPUGraphicsPipeline β€” creates a pipeline object to be used in a graphics workflow. that's it, that's the job, she builds you a pipeline πŸŽ€


✨ SYNOPSIS ✨

#include <SDL3/SDL_gpu.h>

SDL_GPUGraphicsPipeline * SDL_CreateGPUGraphicsPipeline(
    SDL_GPUDevice *device,
    const SDL_GPUGraphicsPipelineCreateInfo *createinfo);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, there are optional properties you can hand over through props (yes, props, she's a vibe) πŸ’œ and here's the one supported property, no cap:

  • SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING β€” a name that can be displayed in debugging tools. it's giving "label your stuff so future you doesn't cry" 🏷️✨

πŸ‘‘ FUNCTION PARAMETERS πŸ‘‘

  • device β€” a GPU Context. your main character, the whole GPU situation πŸ’…
  • createinfo β€” a struct describing the state of the graphics pipeline to create. it's the blueprint, the mood board, the whole plan fr fr πŸ“‹

🌈 RETURN VALUE 🌈

Returns a graphics pipeline object on success, or NULL on failure 😭 β€” and when it flops, call SDL_GetError() for more information. she will tell you what went wrong, just ask 🫢

not me getting NULL back and forgetting to check the error… bestie. check the error. πŸ™ˆ

⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. so if you're on anything older, she's simply not there yet πŸ’€

πŸ’– SEE ALSO πŸ’–

go read those too, they're the friend group, you can't just know one of them 🌸


and that's the whole page babes πŸ’… brought to you by Simple Directmedia Layer, SDL 3.4.18, and this lil SDL_CreateGPUGraphicsPipeline(3) moment β€” periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from