access violation in wglMakeCurrent
Posted
by Stefan
on Stack Overflow
See other posts from Stack Overflow
or by Stefan
Published on 2009-12-22T20:42:23Z
Indexed on
2010/04/07
17:03 UTC
Read the original article
Hit count: 889
Sometimes in my OpenGL application I get an access violation in the following API call:
wglMakeCurrent(NULL, NULL);
The application only has one single thread, and I've checked that before that call, both the DC and HGLRC that are currently used are correct and valid.
There are three different windows with OpenGL content, and they're all redrawn on WM_PAINT messages and if a refresh is required due to user interaction (e.g., picking an object).
Also this access violation happens on different machines with different graphic cards, so I don't think it's a driver issue.
What could make this API call crash? What should I investigate in the app code to find out where/why this happens? I'm really lost here since I've checked everything I could think of already. I hope someone can give me hints/ideas on what more to check.
© Stack Overflow or respective owner