Commits

Roi Atalla committed d8cfcc4

Made the "test" windowed.

  • Participants
  • Parent commits c55cc89

Comments (0)

Files changed (2)

src/main/java/com/ra4king/opengl/test/Test.java

 	}
 	
 	public Test() {
-		super(true);
+		super("Test",800,600,true);
 	}
 	
 	private ShaderProgram program;
 		
 		program.begin();
 		glUniformMatrix4(perspectiveMatrix, false, new Matrix4().clearToPerspective((float)Math.PI/2, getWidth(), getHeight(), 1, 1000).getBuffer());
+		glUniformMatrix4(modelViewMatrixUniform, false, modelViewMatrix.getBuffer());
 		program.end();
 		
 		float[] vertices = {
 		program.begin();
 		
 		glBindVertexArray(vao);
-		glUniformMatrix4(modelViewMatrixUniform, false, modelViewMatrix.getBuffer());
 		glDrawElements(GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, 0);
 		glBindVertexArray(0);
 		

src/main/java/com/ra4king/opengl/util/math/Matrix4.java

 		
 		m[15] = 1;
 		
-		for(int a = 0; a < 4; a++)
-			System.out.println(m[a] + " " + m[a+4] + " " + m[a+8] + " " + m[a+12]);
-		System.out.println();
-		
 		return mult(m);
 	}