在运行红宝书8版的源码的时候,遇到glGenVertexArrays调用时崩溃的问题。解决方式是在glewInit()前加入glewExperimental = GL_TRUE;
要用这句代码来开启glew对扩展的支持
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.