OpenGL: 初始化代码必须放在ShowWindow()之前

 // Must before ShowWindow() is called, otherwise fail in release mode
 mOpenGlPainter.Init(hWnd);
 mOpenGlPainter.Resize();
 
 // Display the window
 ShowWindow(hWnd, nCmdShow);
 UpdateWindow(hWnd);

否则Release模式会间断性出错, 不知为什么

原文地址:https://www.cnblogs.com/mrfangzheng/p/2039132.html