glfwCreateWindow return

lotusword wrote on Monday, February 15, 2016:

I tried to use glfwCreateWindow on Parallel Desktop 11 of Visual Studio Community 2015, Windows 10 64bits, but it returns NULL. I have added all the include files, all the lib files, and put the glfw3.dll file into Windows/System32 and Windows/SysWOW64. I have also checked that my driver is the latest version. Can someone tell me if it is the virtual machine’s problem or I missed something in the process? Thanks a lot for your help.

Set an error callback and see what it tells you. Whenever glfwCreateWindow returns NULL (or any other error occurs) you should get a human-readable error description.

I second this question.

Randomly (quite rare) glfwCreateWindow returns NULL. There is no error callback in such case and all I can do is to terminate application. If there is a way of reading error message without callback, I would use it.

All I can tell is that the only way to recreate this error on Windows 7, DellXPS17 is when I use Chrome to scroll Facebook until it eats up its share. My guess is that glfw cares too much and tries to protect my brain from damage due to FB overload.

Note that Parallels Desktop currently only supports OpenGL 2.1 or lower (and then only if the host system does so). So if you’re asking for a higher OpenGL version you can get NULL returned.

Your question is slightly different as lotusword gets NULL all the time.

Occasionally getting a NULL is a different problem, use the error callback as elmindreda mentions to get more information. You may also want to try updating your drivers.