Zocleus
09-15-2000, 06:10 AM
Does anyone have an idea why I have to call a GL function before I can get the number of pixel formats supported. In the following code, if I remove glLoadIdentity() (and do a Rebuild All), DescribePixelFormat returns 0. I thought this could be an ICD problem but I tried it on a G400 and a GeForce2 and I got the same problem.
int APIENTRY WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MSG msg;
HDC hDC;
PIXELFORMATDESCRIPTOR pfd
hDC = GetDC(NULL);
// Any GL function...
glLoadIdentity();
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
int nFormatCount = DescribePixelFormat (hDC, 1, 0, NULL);
return msg.wParam;
}
int APIENTRY WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MSG msg;
HDC hDC;
PIXELFORMATDESCRIPTOR pfd
hDC = GetDC(NULL);
// Any GL function...
glLoadIdentity();
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
int nFormatCount = DescribePixelFormat (hDC, 1, 0, NULL);
return msg.wParam;
}