I just installed a GTX 960 and installed the (353.62/355.97/368.39) driver because it supposedly supports OpenGL 4.5. For some reason, creating and OpenGL 4.5 context does not work. Apparently the error I am getting is a result of the graphics drivers not being up to date or not supporting OpenGL 4.5, yet I am using the 355.97 driver. It was suggested on nvidia.custhelp.com that I should install the 368.39 driver (which I already tried) then to create a new administrator user and update the drivers on that account. This did not change anything.
I create a PIXELFORMATDESCRIPTOR with 32 bit color depth, 24 bit depth buffer and 8 bit stencil buffer. I then create a dummy OpenGL 4.5 context using the desktop window HWND’s device context.
HDC deviceContext = GetDC(GetDesktopWindow());
int pixelFormat;
pixelFormat = ChoosePixelFormat(deviceContext, &pfd);
SetPixelFormat(deviceContext, pixelFormat, &pfd);
HGLRC context = wglCreateContext(deviceContext);
wglMakeCurrent(deviceContext, context);
The context object is null after wglCreateContext() and I am unable to initialize the OpenGL Extension Wrangler or create a window. I find this error odd because of the fact that this program executes cleanly on my laptop (Lenovo y510p running a GT755M with the 355.97 driver). I know for a fact that I am correctly creating the context because I was able to run the program on my R9 270x and on my Lenovo y510p.
Both my desktop computer (the one with the problem) and my laptop are running Windows 10 x64.