Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef HGLRC (APIENTRY* PFNWGLCREATECONTEXTATTRIBSARB)(HDC hDc, HGLRC hShareContext, const int* attribList);
- PFNWGLCREATECONTEXTATTRIBSARB wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARB)wglGetProcAddress("wglCreateContextAttribsARB");
- int attribs[] = {
- WGL_CONTEXT_MAJOR_VERSION_ARB, 4,
- WGL_CONTEXT_MINOR_VERSION_ARB, 1,
- WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_DEBUG_BIT_ARB,
- WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
- 0
- };
- auto tmpCtx = wglCreateContextAttribsARB(mWindowDC, nullptr, attribs);
- wglMakeCurrent(nullptr, nullptr);
- wglDeleteContext(mRenderContext);
- mRenderContext = tmpCtx;
- W32_CALL(wglMakeCurrent(mWindowDC, mRenderContext));
Advertisement
Add Comment
Please, Sign In to add comment