diff --git a/src/main/java/io/github/hydos/ginger/engine/io/Window.java b/src/main/java/io/github/hydos/ginger/engine/io/Window.java index 74f5ad0..9fd06f3 100644 --- a/src/main/java/io/github/hydos/ginger/engine/io/Window.java +++ b/src/main/java/io/github/hydos/ginger/engine/io/Window.java @@ -89,8 +89,6 @@ public class Window { } public static void update() { - for(int i = 0; i < GLFW.GLFW_KEY_LAST; i++) keys[i] = isKeyDown(i); - for(int i = 0; i < GLFW.GLFW_MOUSE_BUTTON_LAST; i++) mouseButtons[i] = isMouseDown(i); IntBuffer widthBuffer = BufferUtils.createIntBuffer(1); IntBuffer heightBuffer = BufferUtils.createIntBuffer(1); GLFW.glfwGetWindowSize(window, widthBuffer, heightBuffer); 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 0197bfe..a228fdf 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 @@ -20,6 +20,10 @@ public class OBJFileLoader { try { scene = Assimp.aiImportFile(resourceLocation + filePath, Assimp.aiProcess_JoinIdenticalVertices | Assimp.aiProcess_Triangulate); + if (scene == null) { + throw new IllegalStateException(Assimp.aiGetErrorString()); + } + AIMesh mesh = AIMesh.create(scene.mMeshes().get(0)); int vertexCount = mesh.mNumVertices(); diff --git a/target/classes/io/github/hydos/ginger/engine/io/Window.class b/target/classes/io/github/hydos/ginger/engine/io/Window.class index ffc3c3a..ac19d4c 100644 Binary files a/target/classes/io/github/hydos/ginger/engine/io/Window.class and b/target/classes/io/github/hydos/ginger/engine/io/Window.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 f3d98b1..2c469c8 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