Hi all,
i have some strange problem with MATROX graphic cards. The call of wglCreateContext
will cause a crash. At the same time, i got
a strange message in debug ouput:
00000006 12.76177978 *******************************************************************************
00000007 12.76178201 *
00000008 12.76178481 * A driver is mapping physical memory 0007B000->00095FFF
00000009 12.76178760 * that it does not own. This can cause internal CPU corruption.
00000010 12.76179012 * A checked build will stop in the kernel debugger
00000011 12.76179263 * so this problem can be fully debugged.
00000012 12.76179459 *
00000013 12.76179822 *******************************************************************************
Here’s my code:
PIXELFORMATDESCRIPTOR pfd;
int PixelFormat;
memset(&pfd, 0, sizeof(pfd));
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 = 24;
pfd.cRedBits = 8;
pfd.cGreenBits = 8;
pfd.cBlueBits = 8;
pfd.cDepthBits = 8;
pfd.cAccumBits = 24;
pfd.cAccumRedBits = 8;
pfd.cAccumGreenBits = 8;
pfd.cAccumBlueBits = 8;
PixelFormat = ChoosePixelFormat(_hdc, &pfd);
if(PixelFormat == 0)
{
return;
}
if(SetPixelFormat(_hdc, PixelFormat, &pfd) ==FALSE)
{
return;
}
if((_hglrc = wglCreateContext(_hdc)) == NULL)
{
return;
}
wglMakeCurrent(_hdc, _hglrc);
On other graphic devices (ATI & GEFORCE), i have no problems.
More strangely, if i change my system display
to 24bit (instead of 32bit), it even works on MATROX.
Does anyone have a hint ?