SDL_GPUSampleCount(3type)

πŸ’– SDL_GPUSampleCount πŸ’–

okay bestie, so this one is from the SDL3 DATATYPES crew, and it's genuinely one of the cutest little enums you'll ever meet. it's giving "small but mighty". no cap. πŸ¦‹


✨ NAME ✨

SDL_GPUSampleCount β€” specifies the sample count of a texture. that's it. that's the whole job. she's a sample count. she counts samples. slay. πŸ’…


✨ SYNOPSIS ✨

first things first, you gotta bring her in:

#include <SDL3/SDL_gpu.h>

and here's the whole girl, in all her glory:

typedef enum SDL_GPUSampleCount
{
    SDL_GPU_SAMPLECOUNT_1,  /**< No multisampling. */
    SDL_GPU_SAMPLECOUNT_2,  /**< MSAA 2x */
    SDL_GPU_SAMPLECOUNT_4,  /**< MSAA 4x */
    SDL_GPU_SAMPLECOUNT_8   /**< MSAA 8x */
} SDL_GPUSampleCount;

look at her. four whole members. an icon. πŸ‘‘


✨ DESCRIPTION ✨

okay so used in multisampling. that's the vibe. MSAA, anti-aliasing, the whole smooth-edges situation. 🌈

but here's the thing you cannot skip, bestie β€” and I'm saying this with my whole chest:

this value only applies when the texture is used as a render target. periodt. if your texture is out here living its best life as something else, this sample count is just decorative. it does nothing. it's a vibe check that nobody's checking. πŸ’€

✨ AVAILABILITY ✨

this enum has been available since SDL 3.2.0. so if you're on anything older... girl. upgrade. 🧚


✨ SEE ALSO ✨

go read those next, they're lowkey the ones that actually use this enum, and you'll want the full picture. iykyk. 🫢


and that's the tea, fr fr. this page came to you courtesy of Simple Directmedia Layer, straight out of SDL 3.4.18 β€” mwah, kisses, go make something pretty with it. πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from