Hardware specifics: Intel

From OpenGL.org
Jump to: navigation, search

Windows

Issue with wglMakeCurrent()

Even if:

BOOL status=wglMakeCurrent(NULL,NULL);

is a valid statement to make the calling thread's current OpenGL rendering context no longer current (and it returns TRUE with nVidia and ATI drivers), Intel drivers return FALSE because the device context is NULL. The workaround is to always pass an existing device context:

 HDC dc;
 ...
 BOOL status=wglMakeCurrent(dc,NULL);

The documentation of wglMakeCurrent() ( http://msdn.microsoft.com/en-us/library/dd374387%28VS.85%29.aspx ), explicitly says that "In this case, hdc [the first argument] is ignored."