Pixel Format (w/o Sdl)


Mudi

You're pushing your luck little man
Joined
Jan 25, 2006
Messages
815
Website
mudiweb.com
How do you change the pixel format without SDL? I want 555 pixels so I can use the last bit as blitting transparency or something. I can force it from any pixel format to 565 but I can't figure out 555.
 
How do you change the pixel format without SDL? I want 555 pixels so I can use the last bit as blitting transparency or something. I can force it from any pixel format to 565 but I can't figure out 555.
I'm not sure I'm getting exactly what you're wanting. What pixel format?
The hardware blitter only supports 1/8/16 bit colours and the display only supports 4/8/16 bit (24 as well, but I don't think all the pins are connected so it's not usable.)

The blitter uses colour-key transparency, i.e. you select a 16bit colour so that when the blitter reads a source pixel of said colour it doesn't alter the corresponding pixel in the destination. There's no support for bit-masks.
 
Last edited by a moderator:
I'm actually just doing software blitting, and I know in SDL you can set the primary surface to 15-bits... but I guess that's just a shadow layer or whatever?

Oh well, I can change my blit function so it only copies the greater 5 bits of green and uses the sixth bit as mode-change... I don't want to make a specific color set to index transparency unless it's essentially the only option.
 
SDL does make usability layers for the sake of the code, so it might be that SDL is giving you a virtual 15bit surface and mixing to 16 bits each frame (which should be quite simple).
 
Back
Top