Why doesn’t SDL_GetRGB seem to be visible? I knew about it and used it
only because I tried peeking into the code to figure out what the
surface format members were for, but apparently it’s not documented and
for all I know is not even part of the (official) API. It’s a very
useful function (it’s essentially an inverse to SDL_MapColor) that I’ve
found a lot of uses for (color interpolation in my antialiased
primitives for one). I hope it becomes part of the documented API in
the next version, even if it is only five lines of code in the source!–

| Rafael R. Sevilla @Rafael_R_Sevilla |
| Instrumentation, Robotics, and Control Laboratory |

College of Engineering, University of the Philippines, Diliman

Whoops–SDL_GetRGB appears to work, I was passing pointers to ints instead
of pointers to unsigned chars, so only the LSB was getting set by the
routine. I didn’t get a compiler error for incompatible pointers, and
looking in the SDL header files there is no declaration of SDL_GetRGB…

Now since it isn’t documented and doesn’t appear in the header files, maybe
we shouldn’t use it?