Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: wglMakeCurrent - The handle is invalid

Threaded View

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2013
    Posts
    5

    wglMakeCurrent - The handle is invalid

    Hello,

    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:
    Code :
    ...
    if (wglMakeCurrent ((HDC )myWindowDC, (HGLRC )myGContext) != TRUE)
    ...
    I uploaded the project here if anyone wants to take a look www.uppit.com/tk1gzrwu0hz5/project.zip
    What is a likely cause of this?
    Last edited by scarecr0w132; 12-29-2013 at 06:56 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •