22HGLRC jbxwl::WGLCreateContext(CDC* pDC, PIXELFORMATDESCRIPTOR* param)
28 int pixelformat = ::ChoosePixelFormat(pDC->GetSafeHdc(), param);
29 if (pixelformat) ret = ::SetPixelFormat(pDC->GetSafeHdc(), pixelformat, param);
32 hrc = ::wglCreateContext(pDC->GetSafeHdc());
34 ret = ::wglMakeCurrent(pDC->GetSafeHdc(), hrc);
36 ::wglDeleteContext(hrc);
47BOOL jbxwl::WGLGetCurrent(CDC* pDC, HGLRC hrc)
49 return ::wglMakeCurrent(pDC->GetSafeHdc(), hrc);
56void jbxwl::WGLDeleteContext(HGLRC hrc)
58 ::wglMakeCurrent(NULL, NULL);
59 ::wglDeleteContext(hrc);