Mail Archives: djgpp/1998/08/18/09:00:27
Keith Stropus wrote:
>
> Hello! I have a question. I got a demo program the demonstrates how to use
> VESA VBE. I modified it to use 800x600x24. The original program used
> 640x480x8, and used the rgb tables. Now I cannot seem to figure out how the
> heck to use the 24bit color. No matter what I do, I can only access 256
> colors at a time. I have no experience in 24bit color programming. I was
> under the impression that 24bit color meant that you could display 16million
> colors on the screen at once. Can anyone tell me how to do this? I would
> really appreciate it.
> thanks...
If you've corectly set the 24 bits mode, you must not access it as a 256
colors mode. There is no more palette available. For each point you have
to set the R,G and B level.
eg: you video adress is adr;
struct
{
char r,g,b;
} *adr;
to set point 0:
adr[0].r=red;
adr[0].b=blue;
adr[0].g=green;
--
^ ^ ^
| | |
+-+-+ Fabrice ILPONSE
| email: fabrice AT asim DOT lip6 DOT fr
|
|
-
- Raw text -