Screenshot question [solved]

Started by
1 comment, last by Daaark 19 years, 5 months ago
I've got some screenshot code to save to tgas. I grab all the RGBA data and store it in a 32 bit tga. My programs also fallback to 16 bit mode if the user has a 16 bit desktop. So I'm just wondering if I should be making different code to save the tgas in this mode? what I'm doing is filling an array of width * height * 4 with the rgba data and dumping it into a file. [Edited by - Vampyre_Dark on November 22, 2004 3:20:24 PM]
Advertisement
If you read back the data as GL_RGBA/GL_UNSIGNED_BYTE, you will always get 32-bit RGBA back from OpenGL. If the source format is 16-bit, it will be converted to 32-bit before it's returned to you. So a single function will work for all cases.
Thanks. Just wanted to make sure I'm not making a mess of something. [grin]

This topic is closed to new replies.

Advertisement