e.g.
Color* Screen = new Color[1024*768]; Uint32* converted = static_cast<Uint32*>(Screen);//no conversion, just telling fibs about the data type, because they're bitwise equivalents anyway.If the API uses a different byte-ordering, you can just rearrange the order of the members in your struct, e.g.
struct Color
{
#if defined(API_ARGB)
Uint8 alpha;
Uint8 red;
Uint8 green;
Uint8 blue;
#elif defined(API_BRGA)
Uint8 blue;
Uint8 green;
Uint8 red;
Uint8 alpha;
#else
#error "todo - more options"
#endif
};Yep, an array of bytes, like you're suggesting ;)Also, is there a common, generic way to represent images that isn't API specific?