OpenGL window isn't opening

前端 未结 2 1223
渐次进展
渐次进展 2021-01-24 13:37

I have code from the OpenGLBook (openglbook.com) which compiles, but does not load. I have absolutely no idea why it\'s not loading. The code is as follows:

main

2条回答
  •  后悔当初
    2021-01-24 14:26

    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);
    

提交回复
热议问题