working model loader

pull/1/head
hYdos 2020-02-23 14:39:12 +10:00
parent 433a6dc773
commit d59a03f552
2 changed files with 6 additions and 2 deletions

View File

@ -83,8 +83,12 @@ public class OBJFileLoader {
verticies[i++] = x;
verticies[i++] = y;
verticies[i++] = z;
textureCoords[j++] = vertex.getTextureIndex().x;
textureCoords[j++] = vertex.getTextureIndex().y;
textureCoords[j * 2] = vertex.getTextureIndex().x;
textureCoords[j * 2 + 1] = 1 - vertex.getTextureIndex().y;
j++;
}
return new ModelData(verticies, textureCoords, new float[normals.sizeof()], indicesList, i);