How are 565 textures generated?
"Stephen J Baker" <[email protected]> Wed, 25 Jan 2006 11:22:23 -0800
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
If I create a texture with an external format that is 8+8+8 bit RGB, and an internal format of 5+6+5 RGB, how is the data converted by glTexImage2D ? Are the least significant bits dropped, rounded or something else? It *looks* like (at least on nVidia 6800 on their latest Linux drivers) they are doing something other than just truncating the LSbits. I have two textures that don't match - one of which has been converted to 5/6/5 in software (by just truncating bits) - the other has been converted by the driver. The path to this point is pretty convoluted and it's *possible* that there is some other cause - but I'd like to eliminate this cause if possible. It seems that if the driver rounded the data then there would be a problem with numbers like 0xFF being rounded up to 0x100 and overflowing. That's what made me assume they'd be truncating it. I also wonder what (if any) things are done to keep the extra bit of green precision from generating magenta/green tints to otherwise grey areas of the image. ----------------------------------------------------------------------- The second law of Frisbee throwing states: "Never precede any maneuver by a comment more predictive than "Watch this!"...it turns out that this also applies to writing Fragment Shaders. ----------------------------------------------------------------------- Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: [email protected] http://www.link.com Home: [email protected] http://www.sjbaker.org ----- FAQ and OpenGL Resources at: http://www.geocities.com/SiliconValley/Hills/9956/OpenGL -- Author: Stephen J Baker INET: [email protected] Fat City Hosting, San Diego, California -- http://www.fatcity.com --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [email protected] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).