which graphics cards support openGL

Is there some kind on function or code and let us know if the the graphics card installed in the computer supports openGL?

thanx for any input
Joe

If you mean the “hardware” support for OpenGL, and you work in a Windows, you can use this function:

// hDC : a handle to the device context that is associated with the current OpenGL rendering context
bool Check4hwOpenGL( HDC hDC )
{
int iPixelFormat = GetPixelFormat(hDC);

PIXELFORMATDESCRIPTOR pfd;

DescribePixelFormat( hDC, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
return !(pfd.dwFlags & PFD_GENERIC_FORMAT);
}

but if I am using glutCreateWindow to create a window, how can I get a handle to the device context type HDC? to pass it to my check4 procedure?

thnx for any input
Joe

Originally posted by Serge K:
[b]If you mean the “hardware” support for OpenGL, and you work in a Windows, you can use this function:

// hDC : a handle to the device context that is associated with the current OpenGL rendering context
bool Check4hwOpenGL( HDC hDC )
{
int iPixelFormat = GetPixelFormat(hDC);

PIXELFORMATDESCRIPTOR pfd;

DescribePixelFormat( hDC, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
return !(pfd.dwFlags & PFD_GENERIC_FORMAT);
}[/b]

The wglGetCurrentDC function obtains a handle to the device context that is associated with the current OpenGL rendering context of the calling thread.

HDC wglGetCurrentDC(VOID);

Thnx a lot for u’r help