没用过OpenGL,但我查看了以下MSDN,发现它有段示例代码是这样写的
HDC hdc;
HGLRC hglrc;
// create a rendering context
hglrc = wglCreateContext (hdc);
// make it the calling thread's current rendering context
wglMakeCurrent (hdc, hglrc);
// call OpenGL APIs as desired ...
// when the rendering context is no longer needed ...
// make the rendering context not current
wglMakeCurrent (NULL, NULL) ;
// delete the rendering context
wglDeleteContext (hglrc);所以你可以试下将wglMakeCurrent(m_hDC, NULL);改为wglMakeCurrent(NULL, NULL);
HDC hdc;
HGLRC hglrc;
// create a rendering context
hglrc = wglCreateContext (hdc);
// make it the calling thread's current rendering context
wglMakeCurrent (hdc, hglrc);
// call OpenGL APIs as desired ...
// when the rendering context is no longer needed ...
// make the rendering context not current
wglMakeCurrent (NULL, NULL) ;
// delete the rendering context
wglDeleteContext (hglrc);所以你可以试下将wglMakeCurrent(m_hDC, NULL);改为wglMakeCurrent(NULL, NULL);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货