From: Fabrice ILPONSE Newsgroups: comp.os.msdos.djgpp Subject: Re: 24bit color Date: Tue, 18 Aug 1998 11:21:57 +0200 Organization: Universites Paris VI/Paris VII - France Lines: 38 Message-ID: <35D947B5.EB726AE2@asim.lip6.fr> References: <6raoic$7ri$1 AT nnrp3 DOT snfc21 DOT pbi DOT net> NNTP-Posting-Host: asim.lip6.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 | | -