View Full Version : 16Bit Grey Scale Pixel Format
I currently have a successful OpenGL programme for Windows NT4.0. One of the limitations I am finding is the pixel format. I am not really interested in true colour per se, but actually need a grey scale at least 16 bits in length. I can't use color index mode because I need to use blending and fog effects. So, is there some way I can modify the RGBA pixel formats to have, say, a single colour of 16 bits with the remaining colours set to four bits each? Note that I draw to a bitmap, not the screen.
Can anyone help, please?
06-10-2002, 08:10 AM
Right now there is no common need for such a pixelformat since most hardware can only deal with 8Bits per colour component anyway.
Next generation hardware will be able to deal with 10Bit per component and hence introduce extented pixelformats so someday we may even see 16Bit.
So if you need 16Bit greyscales right now you have to write your own software renderer.
Thanks for your comment. It was the sort of answer I expected, but I didn't want to start down that road if there was an alternative.
Don't know if it will help you, but perhaps you can investigate using a combined rgb value as storage for a luminance value. It would involve careful use of blending and fog etc. I guess to make it work, but at least the precision would be available.
I've not checked this myself, but perhaps pbuffers support pixelformats like luminance (luminance_alpha) with more than 8 bits per channel?
06-11-2002, 04:13 AM
If software rendering is ok, then I think Mesa can be compiled to support 16 bit color components.
I think there is a settings for it somewhere in config.h
Thanks for your idea Jean-Marc. I had half thought of this without too much consideration of the implications.
Mikael, you're right. A first glance suggests Mesa does indeed support deep colour channels. I shall definitely investigate this one further.
Thanks to both of you.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.