Mail Archives: djgpp/1997/09/03/15:52:02
You only need to rotate the colors, using this function:
int makecol16 (int r, int g, int b)
{
return (((r>>3) << r_shift) |
((g>>2) << g_shift) |
((b>>3) << b_shift));
The r_shift, g_shift and b_shift are the position of these colors in the
packed 16 bits color mode. Usually they are 0 for b_shift, 5 for green and
11 for red, but if you want to be sure, use the values given by the VESA
driver.
Hope that this helps!
Jose Agustin Vericat a.k.a. frodobolson
> Hi,
>
> I'm having trouble getting a putpixel function to work in VESA2 16bpp
> modes. My program uses 24bpp internal rendering, and so I would
appreciate
> if someone could post a 24->16bpp converter. Thanks in advance.
>
> Gingko
>
- Raw text -