Performant hooking of OpenGL to draw an overlay - problems with multiple contexts
问题 Like others in previous questions, I'm trying to hook an arbitrary OpenGL application to draw an overlay onto it. I've hooked SwapBuffers and created a separate context on first call to draw into. See this SO question/answer for the general idea. There are two big problems I'm hitting. First, the calls to wglMakeCurrent to set/restore the context before/after drawing absolutely destroy performance. Is this expected? I need to look more into using _ARB_context_flush_control as mentioned by