Sign in to follow this  
Daaark

Screenshot question [solved]

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this