OpenGL window isn't opening

本秂侑毒 提交于 2019-12-02 03:24:19
glutInitContextVersion(4, 2);

Does your current graphics driver actually support OpenGL 4.2? If not, then your window creation will fail. 4.2 is still rather new; try 4.1 instead.

Try debugging! Place a breakpoint on your main function and step through until something causes the program to exit.

As Nicol Bolas mentioned, you might not have a graphics card that supports OpenGL 4.2. Go on to AMD or nVidia's website and find out if your graphics card supports OpenGL 4.2. If not, then change the following line to whatever version your card supports.

glutInitContextVersion(4, 2);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!