Hey everyone. This week I had the strange itch to see if I could do any OpenGL work on worker threads, and if so, if it would actually have any benefits. TL:DR, yes it can happen without too much trouble (depending on your architecture), and it did help me get my load time down by ~5ms per 2048x2048 RGB glTexImage2D(...).
All you need to set this up is to create an OpenGL context for each thread, who has its context shared with your main thread's context. The process for doing this is surprisingly easy, it can just be one function call. Here's an example
HGLRC MainContext = wglCreateContextAttribsARB(WindowDC, 0, OpenGLAttribs); HGLRC WorkerThreadContext = wglCreateContextAttribsARB(WindowDC, MainContext, OpenGLAttribs);By passing the main context to the wglCreateContextAttribsARB function, it creates and shares all in one call. If for some reason you created your contexts separately, you can also use wglShareLists(...).
After creating the co


