rensutheart wrote on Wednesday, December 02, 2015:
Hello,
I have a problem setting the required OpenGL version in my application. What is strange is that it used to work, but recently I upgraded to Windows 10 and updated all my graphics card drivers (NVIDIA GT540M) and now my my program creates NULL windows (with glfwCreateWindow()).
Using the exact code from http://www.glfw.org/docs/3.0/quick.html my programs funcions perfectly, but as soon as I call glfwWindowHint to set the OpenGL version I want to use (OpenGL 3.3) it causes the mentioned NULL windows to be created. However, if I set the version to OpenGL 2.1 or lower it works fine again.
I’m using Visual Studio Community 2013 (and 2015) and I’m quite sure I set up the libraries and includes up correctly (also included opengl32.lib).
Here is my code segment where I changed the example:
GLFWwindow* window;
glfwSetErrorCallback(error_callback);
if (!glfwInit())
exit(EXIT_FAILURE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
window = glfwCreateWindow(640, 480, "Simple example", NULL, NULL);
if (!window)
{
glfwTerminate();
exit(EXIT_FAILURE);
}
glfwMakeContextCurrent(window);
Any help would be appreciated!