Glew does not init

匆匆过客 提交于 2019-12-11 18:24:25

问题


I am using the following code to check for any error:

glfwInit();
glewExperimental = GL_TRUE;
if (glewInit() != 0)
{
    std::cout << "Failed to initialize GLEW" << std::endl;
    return -1;
}

I am using the non static version of Glew and I have included the .dll file in the Debug folder. I am using Visual Studio Community 2013. All other solutions suggested to set glewExperimental to GL_True or check the error checking, but I have done that and it is still does not work.


回答1:


You don't have a GL context just by glfwInit(), so GLEW has nothing to work on. You must create a GL context and make it current to the thread, which for GLFW implies creating a window.



来源:https://stackoverflow.com/questions/29873318/glew-does-not-init

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!