Sign in to follow this  
mreiland

OpenGL bitdepths

Recommended Posts

When using OpenGL you have the ability to specify the exact bitdepth for the Red,Green, and Blue colors. I was just curious, how often do people actually use this to specify something other than the usual? And what were the specific reasons for doing so?

Share this post


Link to post
Share on other sites
Are you referring to the glColor functions?

If so, using glColor3b() - bytes - is going to give you a much lower memory footprint than glColor3f() - floats.

Share this post


Link to post
Share on other sites
Quote:
Original post by mreiland
I know I'm probably just ignorant in this respect, but I would really appreciate it if someone would take the time to help me out :)


I still don't understand your question.
Please give an example.

Share this post


Link to post
Share on other sites
well, you can request different bitdepths (e.g. 5-blue, 6-green, 5-red) but they'll only be activated if the video card supports it. The prior is a popular 16-bit format, but if you were to request, say, 7-3-6 (b-g-r) you probably wouldn't get it. (which is why you should always check that what you've requested is actually enabled, and if not, what the bitdepths are that have been enabled.

These days, thanks to hardware advances, most people ask for 24 or 32 bit color (8-8-8 or 8-8-8-8, of course). Remember that these systems for changing the bitdepth were made "way back when" a lot of computer users had old video hardware or ran their display in palettized mode.

So, the answer to your question "what were the reasons for requesting a different bitdepth?", it was usually to get a better bitdepth than was currently being used, or to align the bitdepth with what the images were stored as, etc. It has much less use now than it did then.

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