【发布时间】:2012-11-26 02:56:04
【问题描述】:
我正在尝试学习如何在 opengl 中编程并使用this tutorial。教程 1 工作正常,教程 2 崩溃并返回 1。
它失败了:
GLuint VertexArrayID;
glGenVertexArrays(1, &VertexArrayID);
glBindVertexArray(VertexArrayID);
具体来说:
glGenVertexArrays(1, &VertexArrayID);
有什么建议吗?也相关但从未解决OpenGL, FreeGlut and Glew crash with glGenVertexArrays call
【问题讨论】:
-
您是否按照教程
Do this once your window is created (= after the OpenGL Context creation) and before any other OpenGL call.中的建议进行操作? -
@emartel 我复制了教程的源代码,但还是不行。
-
我明白了,对不起,我不是 OpenGL 专家 :(
-
glGetString(GL_VERSION)返回什么?