I'm creating a game engine that utilizes multiple threads. In its current state, it uses two threads: one for handling windows messages (main thread), and another specifically for OpenGL.
Its not of immediate concern, but I have discovered that the main thread bottlenecks the OpenGL thread. What this means is that if the update loop of the main thread takes longer to complete than loop in the other, it will slow it down. If the main thread is slower, the GL thread will only update as fast as the main thread.
Obviously this isn't a major issue since the main thread will never have more to do than the OpenGL thread, but I'd like to know whats going on to better understand the winapi and OpenGL on windows.
Does anyone know whats happening here?
Note: The GL thread will update normally whenever I interact with the window (move it, resize it, etc).