SDL_PixelFormatDetails(3type)

πŸ’… SDL_PixelFormatDetails (3type) πŸ’…

okay bestie, welcome to the SDL3 DATATYPES corner of the group chat, where today's main character is SDL_PixelFormatDetails β€” literally just the details about the format of a pixel. that's it. that's the whole vibe. a pixel's little ID card. πŸŽ€


✨ NAME ✨

SDL_PixelFormatDetails β€” Details about the format of a pixel.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_pixels.h>

typedef struct SDL_PixelFormatDetails
{
    SDL_PixelFormat format;
    Uint8 bits_per_pixel;
    Uint8 bytes_per_pixel;
    Uint8 padding[2];
    Uint32 Rmask;
    Uint32 Gmask;
    Uint32 Bmask;
    Uint32 Amask;
    Uint8 Rbits;
    Uint8 Gbits;
    Uint8 Bbits;
    Uint8 Abits;
    Uint8 Rshift;
    Uint8 Gshift;
    Uint8 Bshift;
    Uint8 Ashift;
} SDL_PixelFormatDetails;

ngl that struct is giving ✨organized✨. every field is exactly where it needs to be, no chaos, just vibes.


🌈 AVAILABILITY 🌈

This struct is available since SDL 3.2.0. so if you're on something older... bestie, it's not there. upgrade era. πŸ’€


Simple Directmedia Layer ✦ SDL 3.4.18 ✦ SDL_PixelFormatDetails(3type) β€” and that's the whole page, mwah πŸ’– no cap, she ate and left no crumbs. 🫢

πŸ“¦ where this page comes from