Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 29 Dec 2013
Offline Last Active Jan 11 2014 09:01 PM

Topics I've Started

wglMakeCurrent - The handle is invalid

29 December 2013 - 08:12 PM


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:
if (wglMakeCurrent ((HDC )myWindowDC, (HGLRC )myGContext) != TRUE)

I uploaded the project if anyone wants to take a look.
What is a likely cause of this?