I program on WindowsXP platform.
and set PIXELFORMATDESCRIPTOR members like such.
PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
1, // version number
PFD_DRAW_TO_WINDOW | // support window
PFD_SUPPORT_OPENGL | // support OpenGL
PFD_DOUBLEBUFFER, // double buffered
PFD_TYPE_RGBA, // RGBA type
24, // 24-bit color depth
0, 0, 0, 0, 0, 0, // color bits ignored
0, // no alpha buffer
0, // shift bit ignored
0, // no accumulation buffer
0, 0, 0, 0, // accum bits ignored
32, // 32-bit z-buffer
0, // no stencil buffer
0, // no auxiliary buffer
PFD_MAIN_PLANE, // main layer
0, // reserved
0, 0, 0 // layer masks ignored
};
and then go on ChoosePixelFormat(…) and SetPixelFormat(…)
Every thing seems OK!
I check the pixel color format with code:
glGetIntegerv(GL_RED_BITS, &iParam);
And iParam is 8(bit);
But the rendering color is not smooth, looks just like in 256 color!
Why?
Thank you!
Doggle