function getIndex( str )
	{
		var pos,tex,nor,f;
		var has_negative = false;

		//cannot use negative indices as keys, convert them to positive
		if(str.indexOf("-") == -1)
		{
			var index = indices_map.get(str);
			if(index !== undefined)
				return index;
		}
		else
			has_negative = true;

		if(!f) //maybe it was parsed before
			f = str.split("/");

		if (f.length == 1) { //unpacked
			pos = parseInt(f[0]);
			tex = pos;
			nor = pos;
		}
		else if (f.length == 2) { //no normals
			pos = parseInt(f[0]);
			tex = parseInt(f[1]);
			nor = pos;
		}
		else if (f.length == 3) { //all three indexed
			pos = parseInt(f[0]);
			tex = parseInt(f[1]);
			nor = parseInt(f[2]);
		}
		else {
			console.log("Problem parsing: unknown number of values per face");
			return -1;
		}

		//negative indices are relative to the end
		if(pos < 0) 
			pos = vertices.length / 3 + pos + 1;
		if(nor < 0)
			nor = normals.length / 2 + nor + 1;
		if(tex < 0)
			tex = uvs.length / 2 + tex + 1;

		//try again to see if we already have this
		if(has_negative)
		{
			str = pos + "/" + tex + "/" + nor;
			var index = indices_map.get(str);
			if(index !== undefined)
				return index;
		}

		//fill buffers
		pos -= 1; tex -= 1; nor -= 1; //indices in obj start in 1, buffers in 0
		vertices_buffer_data.push( vertices[pos*3+0], vertices[pos*3+1], vertices[pos*3+2] );
		if(uvs.length)
			uvs_buffer_data.push( uvs[tex*2+0], uvs[tex*2+1] );
		if(normals.length)
			normals_buffer_data.push( normals[nor*3+0], normals[nor*3+1], normals[nor*3+2] );

		//store index
		var index = next_index;
		indices_map.set( str, index );
		++next_index;
		return index;
	}
** OBJ parser adapted from SpiderGL implementation *****************
/**
Parses a OBJ string and returns an object with the info ready to be passed to GL.Mesh.load
@method Mesh.parseOBJ
@param {String} data all the OBJ info to be parsed
@param {Object} options
@return {Object} mesh information (vertices, coords, normals, indices)