I am currently using two rendering contexts in the same thread to draw to two different OpenGL windows. I am using wglMakeCurrent to switch between the two each time it’s time to draw to each window. On my personal machine I haven’t seen any speed issues, but on other machines (they have been WinXP SP3 usually with OpenGL 3.X.X) I have seen where the OpenGL graphics slow down, which in turn slows down the entire application since all the OpenGL drawing is done in the main GUI thread. I put some logging in and narrowed it down to the wglMakeCurrent call. When things are working fine, the function call takes less then 0.1 milliseconds. When the problem happens, the function call takes anywhere from 30ms to 100ms. I am trying to draw OpenGL stuff every 30ms or so and my draw function takes less than a few milliseconds except for this wglMakeCurrent call.
Any ideas why wglMakeCurrent may be taking so long?