@foura @neauoire They do! But I think the link that takes us from an indexed surface to what's displayed on the screen has been severed since SDL 2 was released. The most important piece I never found was associating a palette with the indices.
I'm super happy to be proven wrong though, the SDL indexed drawing code would be very optimised! 😊
SDL_SetPaletteColors works with an SDL_Palette rather than a SDL_Surface directly… I never found an API to say “now associate this palette with this surface”.
Searching for both these SDL functions brought me to a specific code example in https://wiki.libsdl.org/SDL_PixelFormat:
> we use that index to read the SDL_Color structure from surface->format->palette->colors
So I can access the palette with surface->format->palette. Hurray! Thanks a bunch 😊
"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko