made a thing a little better in a loop

This commit is contained in:
JISAUAY committed 2024-09-27 09:50:26 -05:00
1 parent 83a527759e
commit ad0ef8e1b6
2 files changed
+3 -5

No files matched your search

+2 -4
View File
@@ -82,18 +82,16 @@ public class Obj {
boolean normal_found = true;
// look for vertex
for (int b = 0; b < 3; b++)
for (int b = 0; b < 3; b++) {
if (temp_v_vbo.get(a + b) != v.get(vertex_index + b)) {
vertex_found = false;
break;
}
// look for normal
for (int b = 0; b < 3; b++)
if (temp_n_vbo.get(a + b) != vn.get(normal_index + b)) {
normal_found = false;
break;
}
}
if (vertex_found && normal_found)
{
+1 -1
View File
@@ -22,7 +22,7 @@ public class Main implements GameLogic {
@Override
public void init(Window window, World world, Render render) {
Entity cube = new Entity("resources/objs/teapot.obj", "resources/shaders/shader.frag", "resources/shaders/shader.vert");
Entity cube = new Entity("resources/objs/cube.obj", "resources/shaders/shader.frag", "resources/shaders/shader.vert");
cube.model = new Matrix4f().identity().translate(0, 0, -10);
System.out.println(cube.model.toString());