Code: Select all
#ifdef WGL_ARB_create_context
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribs_ARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB");
if (wglCreateContextAttribs_ARB)
{
int iAttribs[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
WGL_CONTEXT_MINOR_VERSION_ARB, 1,
0
};
hrc=wglCreateContextAttribs_ARB(HDc, 0, iAttribs);
}
else
#endif
hrc=wglCreateContext(HDc);
Code: Select all
#endif
AntiAlias=0;
#ifdef WGL_ARB_create_context
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribs_ARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddress("wglCreateContextAttribsARB");
#endif
wglMakeCurrent(HDc, NULL);
wglDeleteContext(hrc);
ReleaseDC(temporary_wnd, HDc);
DestroyWindow(temporary_wnd);
UnregisterClass(ClassName, lhInstance);
// ...
#ifdef WGL_ARB_create_context
if (wglCreateContextAttribs_ARB)
{
int iAttribs[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
WGL_CONTEXT_MINOR_VERSION_ARB, 1,
0
};
hrc=wglCreateContextAttribs_ARB(HDc, 0, iAttribs);
}
else
#endif
hrc=wglCreateContext(HDc);
BTW, just curious: what version of context does wglCreateContext create?