Results 1 to 2 of 2

Thread: wglMakeCurrent failed!!

  1. #1
    Member Contributor
    Join Date
    Feb 2003

    wglMakeCurrent failed!!

    I made my render window in MFC. In OnTimer i call my renderscene() which has the following code at its beginning:
    CDC *pDC=GetDC();
    BOOL bResult = wglMakeCurrent (pDC->m_hDC, m_hGLContext);
    if (!bResult)
    TRACE("wglMakeCurrent Failed %x\r\n", GetLastError() ) ;

    there is no problem with wglMakeCurrent.

    BUT i also need to call renderscene() when i want to select object. If this occurs wglMakeCurrent fails even (after found this)i tried to add some logic to prevent conflict(calling it before it finishs).

    This didn't happen on my old PC(win9, now it's win 2000.
    I shall be very happy if anyone has an idea.

    Well, now i come up with more informatiom:
    I found it is glRenderMode(GL_SELECT) in my selection function that makes wglMakeCurrent fails, how? please help, many Thanks

    [This message has been edited by beginner620824 (edited 07-30-2003).]

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2001

    Re: wglMakeCurrent failed!!

    Do you use more than 1 RC? If not, I don't see why you would need to make your context current more than once.

Similar Threads

  1. wglMakeCurrent() ???
    By andreasMank in forum OpenGL: Windows
    Replies: 1
    Last Post: 04-16-2004, 04:08 PM
  2. wglMakeCurrent in W2K/XP
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-07-2002, 12:31 PM
  3. Failed Swapbuffers and wglMakeCurrent in WinNT/OpenGL app
    By Luis in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-27-2001, 09:46 PM
  4. wglMakeCurrent
    By 26hex in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-21-2001, 07:13 PM
  5. wglMakeCurrent
    By DUMEZ in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 06-27-2000, 01:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean