Added ThreadPool class. Improved copy from buffer to texture