OpenGL and HW acceleration [modified]
-
I'm using the below code to enumerate the available pixel formats. For each pixel format, I'm checking the flags to see if this format provides HW accelerated rendering. I'm getting "NONE" for half the formats and "GENERIC" for the other half. I don't get "ACCELERATED" for any of them. I've tried this on multiple machines which have hardware that I would expect to provide HW accelerated OpenGL rendering.
PIXELFORMATDESCRIPTOR pfd;
int maxpf = DescribePixelFormat(hDC,0,0,NULL);
for (int i = 1; i <= maxpf; i++)
{
if (DescribePixelFormat(hDC,i,sizeof(PIXELFORMATDESCRIPTOR),&pfd) == 0)
continue;
if ((pfd.dwFlags & PFD_SUPPORT_OPENGL) == 0)
continue;if ((pfd.dwFlags & PFD_GENERIC_ACCELERATED) != 0)
{
TRACE1("%d: ACCELERATED\n", i);
}
else if ((pfd.dwFlags & PFD_GENERIC_FORMAT) != 0)
{
TRACE1("%d: GENERIC\n", i);
}
else
{
TRACE1("%d: NONE\n", i);
}
}So my question is what is the correct way to determine which pixel formats support HW accelerated rendering? Are the flags in the pixel format even the right place to look? One site I found which discusses this is below: here Seems pretty vague though unfortunately.
modified on Wednesday, August 6, 2008 9:53 AM