所以问题是,当我编译gl3w.h并将其插入我的MinGW / include / GL时,我遇到了这样的错误:
In file included from B:\REPO\game\main.cpp:2:0:
b:\mingw\include\gl\gl3w.h:84:3: error: 'PFNGLBINDTEXTUREPROC' does not name a type
PFNGLBINDTEXTUREPROC BindTexture;
我正在尝试运行的代码是:
#include <GL/glew.h>
#include <GL/gl3w.h>
#include <GLFW/glfw3.h>
int main(int argc, char** argv)
{
glfwInit();
GLFWwindow* window = glfwCreateWindow(640,480, "Triangles", NULL,NULL);
glfwMakeContextCurrent(window);
gl3wInit();
init();
while (!glfwWindowShouldClose(window))
{
display();
glfwSwapBuffers(window);
glfwPoolEvents();
}
glfwDestroyWindow(window);
glfwTerminate();
}
是的,我知道它不是完整的代码,init()以及display()尚未定义。
如何解决这个问题并让它发挥作用?