diff --git a/src/main/java/io/github/hydos/ginger/Example.java b/src/main/java/io/github/hydos/ginger/Example.java index 446a205..cc221c5 100644 --- a/src/main/java/io/github/hydos/ginger/Example.java +++ b/src/main/java/io/github/hydos/ginger/Example.java @@ -61,7 +61,7 @@ public class Example { Window.setBackgroundColour(0.2f, 0.2f, 0.8f); - TexturedModel tModel = ModelLoader.loadModel("Zebra.obj", "stallTexture.png"); + TexturedModel tModel = ModelLoader.loadModel("stall.obj", "stallTexture.png"); tModel.getTexture().setReflectivity(1f); tModel.getTexture().setShineDamper(7f); Player entity = new Player(tModel, new Vector3f(0,0,-3),0,180f,0, new Vector3f(0.2f, 0.2f, 0.2f)); @@ -86,7 +86,7 @@ public class Example { - TexturedModel dragonMdl = ModelLoader.loadModel("dragon.obj", "stallTexture.png"); + TexturedModel dragonMdl = ModelLoader.loadModel("Zebra.obj", "stallTexture.png"); dragonMdl.getTexture().setReflectivity(4f); dragonMdl.getTexture().setShineDamper(2f); diff --git a/src/main/java/io/github/hydos/ginger/engine/obj/OBJFileLoader.java b/src/main/java/io/github/hydos/ginger/engine/obj/OBJFileLoader.java index 8fcfcd2..a78ba0f 100644 --- a/src/main/java/io/github/hydos/ginger/engine/obj/OBJFileLoader.java +++ b/src/main/java/io/github/hydos/ginger/engine/obj/OBJFileLoader.java @@ -80,15 +80,11 @@ public class OBJFileLoader { float y = vertex.getPosition().y; float z = vertex.getPosition().z; - verticies[i] = x; - i++; - verticies[i] = y; - i++; - verticies[i] = z; - i++; - textureCoords[j] = vertex.getTextureIndex().x; - j++; - textureCoords[j] = vertex.getTextureIndex().y; + verticies[i++] = x; + verticies[i++] = y; + verticies[i++] = z; + textureCoords[j++] = vertex.getTextureIndex().x; + textureCoords[j++] = vertex.getTextureIndex().y; } return new ModelData(verticies, textureCoords, new float[normals.sizeof()], indicesList, i); diff --git a/target/classes/io/github/hydos/ginger/Example.class b/target/classes/io/github/hydos/ginger/Example.class index cf5f5e7..d55aa9f 100644 Binary files a/target/classes/io/github/hydos/ginger/Example.class and b/target/classes/io/github/hydos/ginger/Example.class differ diff --git a/target/classes/io/github/hydos/ginger/engine/obj/OBJFileLoader.class b/target/classes/io/github/hydos/ginger/engine/obj/OBJFileLoader.class index d068054..fe39e29 100644 Binary files a/target/classes/io/github/hydos/ginger/engine/obj/OBJFileLoader.class and b/target/classes/io/github/hydos/ginger/engine/obj/OBJFileLoader.class differ