Port to GLFW
Run event loop in single thread
Reset needsRedraw