title: SDL 2.0: Create window in main thread, but do all rendering in separate one
body: <p>This is my current setup: I'm doing OpenGL rendering using SDL (currently on Linux). I initialize SDL (<code>SDL_Init</code>) and create the application window (<code>SDL_CreateWindow</code>) in the main thread and pass it to a second thread. This second thread creates an OpenGL context from it (<code>SDL_GL_CreateContext</code>) and starts a render loop, while the main thread listens for events. I think it's important to note that GL calls are completely confined to this second thread; actually most of my application logic happens there, the main thread is really only responsible for handling events that come in over SDL.</p>
  
  <p>Originally I did this the other way around, but it turns out you can't process events in anything other than the main thread on OSX and probably also Windows, so I switched it around to be compatible those two in the future.</p>
  
  <p>Should I have any concerns that this will not work on OSX/Windows? On Linux, I haven't had any whatsoever. There's lots of information on the internet about context sharing and doing GL calls from multiple threads, but all I want to do is do OpenGL in one thread that is not the main one. I wouldn't like to continue coding my application only to later find out that it won't work anywhere else.</p>