added multi-thread to opengl window