My thinking is all turned around now

This has to do with the byte order of the color components when using 32
bit color under Windows. I’ve been looking at the masks for rgba in
SDL_CreateRGBSurface (). I’ve been using a function that appears to be
shifting the colors into the wrong places but it still works. So,
without stating how I’ve been doing it, order to avoid potential
embarassment, could someone advise me of the proper byte positions for
the Windows environment?

Thanks,
Lilith (the sheepish)

The best way would be to use SDL_MapRGB() and the setpixel() and
putpixel() functions from the SDL doc wiki (under examples->video
IIRC). These should work under any pixel format or bit depth.

Don’t worry about embarrassment. Its very easy to mess up if you do
the byte ordering yourself. =)On 5/8/07, Lilith Calbridge wrote:

This has to do with the byte order of the color components when using 32
bit color under Windows. I’ve been looking at the masks for rgba in
SDL_CreateRGBSurface (). I’ve been using a function that appears to be
shifting the colors into the wrong places but it still works. So,
without stating how I’ve been doing it, order to avoid potential
embarassment, could someone advise me of the proper byte positions for
the Windows environment?

Thanks,
Lilith (the sheepish)


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

The best way would be to use SDL_MapRGB() and the setpixel() and
putpixel() functions from the SDL doc wiki (under examples->video
IIRC). These should work under any pixel format or bit depth.

Don’t worry about embarrassment. Its very easy to mess up if you do
the byte ordering yourself. =)

True dat. Some people have a talent for being able to put this all
together in a thought. I angst over whether index base 0 is going to
throw me off somewhere.>>> On 5/9/2007 at 3:17 AM, Brian <brian.ripoff at gmail.com> wrote:


Lilith