Posted on 2000-05-02
I've got these 2 defines
This is the one I usually used, but the problem is that the r and g will only go till 127 and b till 255
#define RGB16(r,g,b) (unsigned short)( ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3) );
I changed a few things and now I've got the following, which works just perfect.
#define RGB16(r,g,b) (unsigned short)( ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3) );
I only want to verify that the second really is good for a 565 videocard.
What do you guys experts say?