begone input handling
parent
1aeb3ef0b2
commit
4fbf5cf3ef
|
@ -89,8 +89,6 @@ public class Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void update() {
|
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 widthBuffer = BufferUtils.createIntBuffer(1);
|
||||||
IntBuffer heightBuffer = BufferUtils.createIntBuffer(1);
|
IntBuffer heightBuffer = BufferUtils.createIntBuffer(1);
|
||||||
GLFW.glfwGetWindowSize(window, widthBuffer, heightBuffer);
|
GLFW.glfwGetWindowSize(window, widthBuffer, heightBuffer);
|
||||||
|
|
|
@ -20,6 +20,10 @@ public class OBJFileLoader {
|
||||||
try {
|
try {
|
||||||
scene = Assimp.aiImportFile(resourceLocation + filePath, Assimp.aiProcess_JoinIdenticalVertices | Assimp.aiProcess_Triangulate);
|
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));
|
AIMesh mesh = AIMesh.create(scene.mMeshes().get(0));
|
||||||
int vertexCount = mesh.mNumVertices();
|
int vertexCount = mesh.mNumVertices();
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue