SDL_ArrayOrder(3type)

πŸ’… SDL_ArrayOrder πŸ’…

okay so bestie, welcome to the SDL3 DATATYPES corner of the manual, where we talk about SDL_ArrayOrder β€” that's the array component order, low byte ➑️ high byte. yes, byte order. the drama of which channel comes first. πŸŽ€


✨ NAME ✨

SDL_ArrayOrder β€” array component order, low byte -> high byte. literally the blueprint for how the bytes of a pixel line up in memory, from the smallest address to the biggest. no cap. πŸ¦‹


✨ SYNOPSIS ✨

first things first, you gotta pull in the header:

#include <SDL3/SDL_pixels.h>

and here's the whole enum, every single member, exactly as it lives:

typedef enum SDL_ArrayOrder
{
    SDL_ARRAYORDER_NONE,
    SDL_ARRAYORDER_RGB,
    SDL_ARRAYORDER_RGBA,
    SDL_ARRAYORDER_ARGB,
    SDL_ARRAYORDER_BGR,
    SDL_ARRAYORDER_BGRA,
    SDL_ARRAYORDER_ABGR
} SDL_ArrayOrder;

seven members, seven little vibes. it's giving "pick your byte layout and commit." πŸ‘‘


✨ AVAILABILITY ✨

this enum has been around since SDL 3.2.0. so if you're on anything older… yeah, it's not there. πŸ’€


and that's the whole page, bestie, you ate it. 🫢 this was the SDL_ArrayOrder(3type) page from Simple Directmedia Layer, SDL 3.4.18, and yes the footer said SDL_ArrayOrder(3type) too β€” iconic of it honestly. now go order some bytes. πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from