From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: [Q] DJGPP DOCS/VESA INFO Date: Tue, 10 Mar 1998 19:41:14 +0000 Organization: None Message-ID: References: <3500E765 DOT 31456ED7 AT mail DOT coos DOT or DOT us> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 30 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Jason Dagit writes: >I have been looking at the DJGPP user guide, the one with the graphics >chapter by Shawn Hargreaves. I would like to know more about 16 bit and >24 bit color modes. Once you can set a 256 color mode, these are really pretty simple to use. When you are searching for the mode number, look for one with a MemoryModel value of 6 (which represents truecolor, as opposed to 4 for a paletted mode), and a BitsPerPixel value of 15, 16, 24, or 32. You can set this mode exactly as for a 256 color resolution, but need to modify your drawing code to work with 2, 3 or 4 byte pixels rather than just a single byte per pixel. There is no palette in a truecolor mode: instead you form color values by combining the red, green and blue components directly into a packed bitfield. To find out how far these values should be shifted, look at the RedMaskSize, RedMaskPos, GreenMaskSize, etc, fields in the VESA mode info struct. >Also I would like to learn more about linear frame buffers. What do you need to know? I tried to cover all the essential information in the guide, so I will be happy to answer any specific questions that you may have (and hopefully then improve the guide to make things clearer in the future :-) -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ "Pigs use it for a tambourine" - Frank Zappa