From 4fbf5cf3ef7e95905cf7ecaaf06f6e662115ce92 Mon Sep 17 00:00:00 2001 From: hYdos Date: Sun, 23 Feb 2020 11:41:02 +1000 Subject: [PATCH] begone input handling --- .../github/hydos/ginger/engine/io/Window.java | 2 -- .../ginger/engine/obj/OBJFileLoader.java | 4 ++++ .../hydos/ginger/engine/io/Window.class | Bin 7613 -> 7519 bytes .../ginger/engine/obj/OBJFileLoader.class | Bin 4877 -> 4977 bytes 4 files changed, 4 insertions(+), 2 deletions(-) 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/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