How to check at how many bits I am displying.

Hi All,

Is it possible to check at how many bits I am displaying.
I want to display a 16 bit gray image but I think it is only 8 bits.

I am use Delphi:

WordBuffer: Array of Word;

CreateRenderingContext(MyWindow.DC, [opDoubleBuffered], 32, 24, 8, 64, 4, 0);

// Create 1 Textures
glGenTextures(1, addr(MapTex));
// Bind The Texture
glBindTexture(GL_TEXTURE_2D, MapTex);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, ImageWidth,
  ImageHeight, 0,GL_LUMINANCE, GL_UNSIGNED_SHORT, addr(WordBuffer[0]));

Any ideas?

I have WinXP Pro, GeForge 8600 GT and a 16.7 M color monitor.

Thanks.

Peter.

yup
use GetPixelFormat to get the RC used by your program, and get the color depth of this Pixel format with DescribePixelFormat.(win)