added close/open flag,fixed vertex num error, adding texcoord indexing