I get the error failed to set the pixel format from the following code. The code is very simple, can anyone elaborate.
int _pfAttributes[] = {
WGL_DRAW_TO_WINDOW_ARB, GL_TRUE,
WGL_SUPPORT_OPENGL_ARB, GL_TRUE,
WGL_DOUBLE_BUFFER_ARB, GL_TRUE,
WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
WGL_COLOR_BITS_ARB, 32,
WGL_DEPTH_BITS_ARB, 24,
WGL_STENCIL_BITS_ARB, 8,
0
};
int _dpf;
UINT _dFormats;
wglChoosePixelFormatARB(g_hDC, _pfAttributes, 0, 1, &_dpf, &_dFormats);
if (!_dFormats)
fatal_error("Failed to choose the OpenGL 3.3 pixel format.");
PIXELFORMATDESCRIPTOR _pfd = { NULL };
DescribePixelFormat(g_hDC, _dpf, sizeof(_pfd), &_pfd);
if (!SetPixelFormat(g_hDC, _dpf, &_pfd))
fatal_error("Failed to set the OpenGL 3.3 pixel format.");