Alloc'ing PixelFormats

How do you create a PixelFormat from scratch? All the fields in
SDL_PixelFormat are supposed to be read only. There is an SDL_AllocFormat
function is SDL_pixels.c buts its not exported.

Long live the confused,
Akawaka.–
Bother! said Pooh, as he shot the Emperical drone.

How do you create a PixelFormat from scratch? All the fields in
SDL_PixelFormat are supposed to be read only. There is an SDL_AllocFormat
function is SDL_pixels.c buts its not exported.

I’m curious, why do you need to do this?

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

I want to do some pixel comparisions on surfaces so I want to convert them
to a common 32-bit format. SDL_ConvertSurface takes a SDL_PixelFormat as
an arguement.

If you know a better way to access pixels cleanly then please…On Thu, 30 Mar 2000, Sam Lantinga wrote:

How do you create a PixelFormat from scratch? All the fields in
SDL_PixelFormat are supposed to be read only. There is an SDL_AllocFormat
function is SDL_pixels.c buts its not exported.

I’m curious, why do you need to do this?

-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Long live the confused,
Akawaka.

Bother said Pooh, as Christopher Robin pleaded to be spanked again.