Jump to content

  • Log In with Google      Sign In   
  • Create Account


Prognatus

Member Since 20 May 2013
Offline Last Active Feb 07 2014 07:06 PM
-----

#5076518 Need help Setting up GLFW for VS2010

Posted by Prognatus on 09 July 2013 - 10:11 PM

I manged to fix it. What i did wrong was download the win64 version of glfw instead of the win32. But now i have a new problem every time i call Initglew() my program clashes.

//Sets the error callback in case of error
glfwSetErrorCallback(Error_callback);

//initailize glfw
if (!glfwInit())
{
exit(EXIT_FAILURE);
return false;
}
//create window
window = glfwCreateWindow(640, 480, "Simple example", NULL, NULL);

if (!window)
{
glfwTerminate();
exit(EXIT_FAILURE);
return false;
}


glewExperimental=true;
GLenum err=glewInit();
if(err!=GLEW_OK)
{
//Problem: glewInit failed, something is seriously wrong.
glfwTerminate();
exit(EXIT_FAILURE);
return false;
}
//set window context
glfwMakeContextCurrent(window);
//sets Key callback
glfwSetKeyCallback(window, Key_callback);

return true;


PARTNERS