I have just used a fair amount of time debugging a multi-threaded OpenGL application, so I thought I would share a few steps on how to setup the GLRC that may save you a headache if you ever need to create a similar application with a dedicated rendering/worker thread:
1: The thread that creates the output window must also create the DC and GLRC (ie. do not attempt to create/get the DC and GLRC in the worker thread (WT) even if it has access to the HWND of the output window).
2: Make sure the DC and GLRC are available to the worker thread; either pass them as arguments when you created the thread or simply make them global, and have the WT make the GLRC current.
That’s it! Enjoy multi-threading with OpenGL
PS: If you create the DC and GLRC in the WT it will actually work, but you will not be able to use extensions, so if you know you will never use functionality beyond OpenGL 1.1 (which is the version of the standard Windows implementation) go ahead and do so if this approach fits better into your program.