Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bosoni committed Oct 16, 2012
1 parent 3fb82ff commit fb61bac
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ public void load(String name)
BufferedReader reader = new BufferedReader(new InputStreamReader(file.read()), 4096);
try {
while ((line = reader.readLine()) != null) {

if(line.length()>0 && line.charAt(0)=='\t')
line = line.substring(1);
line = line.substring(1).trim();

tokens = line.split("\\s+");

Expand All @@ -329,7 +330,7 @@ else if (tokens[0].toLowerCase().equals("newmtl"))
Material mat;
Texture texture;
if(textureName.length() > 0)
texture = new Texture(textureDir.child(textureName)); //Gdx.files.internal(TEXTURE_PATH + textureName));
texture = new Texture(textureDir.child(textureName));
else
texture = new Texture(1, 1, Format.RGB888); // create default texture
mat = new Material(curMatName, new TextureAttribute(texture, 0, "s_tex"),
Expand Down

0 comments on commit fb61bac

Please sign in to comment.