private static Material loadMaterial(BufferedReader inputStream) {
		Material mat = null;
		try {
			inputStream.readLine();
			String line = inputStream.readLine();
			String[] colors = line.split(" ");
			Color ambient = new Color(Double.parseDouble(colors[0]), Double
					.parseDouble(colors[1]), Double.parseDouble(colors[2]),
					Double.parseDouble(colors[3]));
			line = inputStream.readLine();
			colors = line.split(" ");
			Color diffuse = new Color(Double.parseDouble(colors[0]), Double
					.parseDouble(colors[1]), Double.parseDouble(colors[2]),
					Double.parseDouble(colors[3]));
			line = inputStream.readLine();
			colors = line.split(" ");
			Color specular = new Color(Double.parseDouble(colors[0]), Double
					.parseDouble(colors[1]), Double.parseDouble(colors[2]),
					Double.parseDouble(colors[3]));
			line = inputStream.readLine();
			colors = line.split(" ");
			Color emissive = new Color(Double.parseDouble(colors[0]), Double
					.parseDouble(colors[1]), Double.parseDouble(colors[2]),
					Double.parseDouble(colors[3]));
			line = inputStream.readLine();
			double shininess = Double.parseDouble(line);
			line = inputStream.readLine();
			double transparency = Double.parseDouble(line);
			line = inputStream.readLine();
			String texFile = line;
			texFile = texFile.substring(1);
			texFile = texFile.substring(0, texFile.length() - 1);

			if (!texFile.equals("")) {
				mat = new Material(ambient, diffuse, specular, emissive,
						shininess, transparency, Application.getDataMgr()
								.getTexture(texFile), Application.getDataMgr()
								.getTextureID(texFile));
			} else
				mat = new Material(ambient, diffuse, specular, emissive,
						shininess, transparency);
		} catch (IOException e) {

		}

		try {
			inputStream.readLine();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return mat;
	}