Threadable terrain draw

Fixed the threading issue