Added a bunch of very broken code in an attempt to put OpenGL on its own thread.