SDL_GPUFillMode(3type)

πŸ’… SDL_GPUFillMode πŸ’…

okay bestie, welcome to the SDL3 datatypes corner of the group chat, where today we're talking about SDL_GPUFillMode β€” aka the lil enum that tells your graphics pipeline how it should be drawing your polygons. no cap, it's a tiny one, but it's literally the difference between a solid shape and a wireframe vibe check. πŸ¦‹


✨ NAME ✨

SDL_GPUFillMode β€” specifies the fill mode of the graphics pipeline. that's it, that's the whole job. she's simple, she's iconic, she knows what she wants. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_gpu.h>

typedef enum SDL_GPUFillMode
{
    SDL_GPU_FILLMODE_FILL,  /**< Polygons will be rendered via rasterization. */
    SDL_GPU_FILLMODE_LINE   /**< Polygon edges will be drawn as line segments. */
} SDL_GPUFillMode;

so like, she's an enum, she lives in SDL_gpu.h, and she has exactly two moods. two. that's the whole menu. πŸŽ€


🧚 DESCRIPTION 🧚

lowkey this is one of those enums that just is what it says on the tin, and honestly? we love that for her. when you're setting up a graphics pipeline, you gotta tell it how to turn your polygons into pixels, and this enum is where you make that call. πŸ’–

the way that you only get two options and both of them are real ones:

  • SDL_GPU_FILLMODE_FILL β€” polygons will be rendered via rasterization. so like, actual filled-in solid shapes. the classic. the main character. πŸ”₯
  • SDL_GPU_FILLMODE_LINE β€” polygon edges will be drawn as line segments. so instead of a solid blob you get the outlines, like a lil wireframe moment. very slay, very ✨aesthetic✨.

ngl, it's giving "small enum, big consequences" β€” whichever one you pick is gonna change how everything you draw actually shows up on screen. choose wisely bestie. πŸ’…


⭐ AVAILABILITY ⭐

this enum is available since SDL 3.2.0. so if you're on anything older, sorry babe, no fill mode for you. πŸ™ˆ


🫢 SEE ALSO 🫢

  • SDL_CreateGPUGraphicsPipeline(3) β€” yeah, this is the one you're gonna be passing this enum into. go read her next, she's the whole reason this enum exists fr fr. 🌈

okay that's the page!! go forth and fill (or line, your choice, we don't judge) your polygons, bestie. πŸ’œ

this little love letter to you came from the Simple Directmedia Layer girlies, shipped with SDL 3.4.18, and it's the SDL_GPUFillMode(3type) page β€” so if you ever forget, just know we were here, being unhinged about an enum with two values. periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from