begone input handling

pull/1/head
hYdos 2020-02-23 11:41:02 +10:00
parent 1aeb3ef0b2
commit 4fbf5cf3ef
4 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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();