wglMakeCurrent - The handle is invalid
I am fairly new to OpenGL, I don't fully understand everything yet:)
I have a viewer with a context. It is being drawn on the UI which has another separate context. (I am using QT for UI, and trying to draw widgets ontop of viewer.)
wglMakeCurrent() which gets called in the viewer code, fails and says from GetLastError(): wglMakeCurrent() failed. The handle is invalid.
This is how it is called:
I uploaded the project here if anyone wants to take a look www.uppit.com/tk1gzrwu0hz5/project.zip
if (wglMakeCurrent ((HDC )myWindowDC, (HGLRC )myGContext) != TRUE)
What is a likely cause of this?