Program Crash on glGenVertexArrays call

后端 未结 3 2027
自闭症患者
自闭症患者 2021-02-07 17:09

I am trying to learn how to program in opengl and am using this tutorial. Tutorial 1 works fine, tutorial 2 crashes with return 1.

It fails on this:

GLu         


        
3条回答
  •  不知归路
    2021-02-07 17:43

    After reading this thread it appears that calling

    glewExperimental = GL_TRUE; 
    glewInit();
    

    Would fix the problem. Reading up on glewExperiemental here, it says that

    GLEW obtains information on the supported extensions from the graphics driver. Experimental or pre-release drivers, however, might not report every available extension through the standard mechanism, in which case GLEW will report it unsupported. To circumvent this situation, the glewExperimental global switch can be turned on by setting it to GL_TRUE before calling glewInit(), which ensures that all extensions with valid entry points will be exposed.

    I'm not too sure how that helps with glGenVertexArrays, but it's worth the try

提交回复
热议问题