tabor25
04-08-2002, 05:41 AM
Hello,
i have to setup opengl for working under 8 bit color-depth. this is how i setup the pixel-format-descriptor :
PIXELFORMATDESCRIPTOR pfd;
memset(&pfd, 0, sizeof PIXELFORMATDESCRIPTOR));
pfd.nSize = sizeof(pfd);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 8;
pfd.iLayerType = PFD_MAIN_PLANE;
pfd.cDepthBits = 16;
after choosing the nearest pixelformat by using the "ChoosePixelFormat"-function, i get a description of the selected one by the "DescribePixelFormat"-function. The recieved pixelformat has 8 bit like desired, but the color white looks black and black is white. it seems that all colors are wrong. So what is wrong with this code. Maybe someone can help!?!
Best regards
tabor25
i have to setup opengl for working under 8 bit color-depth. this is how i setup the pixel-format-descriptor :
PIXELFORMATDESCRIPTOR pfd;
memset(&pfd, 0, sizeof PIXELFORMATDESCRIPTOR));
pfd.nSize = sizeof(pfd);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 8;
pfd.iLayerType = PFD_MAIN_PLANE;
pfd.cDepthBits = 16;
after choosing the nearest pixelformat by using the "ChoosePixelFormat"-function, i get a description of the selected one by the "DescribePixelFormat"-function. The recieved pixelformat has 8 bit like desired, but the color white looks black and black is white. it seems that all colors are wrong. So what is wrong with this code. Maybe someone can help!?!
Best regards
tabor25