3D Engine Adapted to Work in 2D Not Rendering Square Mesh Right

http://puu.sh/n3am6/11935f9c68.png

I am trying to adapt my current (incomplete) 3d engine to work with orthographic projection/2D games but, as above, it doesnt quite render properly. That is meant to be a red square(square data given below):

float[] vertices = new float[]{
				0, 10, 0,
				0, 0, 0,
				10, 0, 0,
				10, 10, 0
			};
			
		int[] indices = new int[]{
			0, 1, 2, 2, 3, 0
		};
		
		Mesh mesh = new Mesh();
		mesh.setIndices(indices);
		mesh.setVertices(vertices);
        Material material = new Material(new Color(1f, 0f, 0f), 0.0f, false);
        mesh.setMaterial(material);
        
        orthoCube = new GameObject();
        orthoCube.setMesh(mesh);
        orthoCube.getTransform().setPosition(new Vector3f(100, 100, 0.5f));
        orthoCube.getTransform().setScale(1.0f);

And here is how i am creating the projection matrix(parameters are: left, right, up, down, near, far):

Projection.createOrthogonal(0, Window.WIDTH, Window.HEIGHT, 0, 1, -100)

That method is here(using JOML):

public static Matrix4f createOrthogonal(float left,float right,float bottom,float top,float near,float far){
		Matrix4f orthogonal = new Matrix4f();

		orthogonal.m00 = 2/(right - left);
		orthogonal.m11 = 2/(top - bottom);
		orthogonal.m22 = -2/(far - near);
		orthogonal.m23 = (far+near)/(far - near);
		orthogonal.m03 = (right+left)/(right -left);
		orthogonal.m13 = (top + bottom)/(top-bottom);
		return orthogonal;
    }

I thought that this should work.

Any suggestions?

Why did you not just use Matrix4f.ortho/setOrtho()?
The correct code of Matrix4f.setOrtho() (leaving out the elements set to zero):


m00 = 2.0f / (right - left);
m11 = 2.0f / (top - bottom);
m22 = -2.0f / (zFar - zNear);
m30 = -(right + left) / (right - left);
m31 = -(top + bottom) / (top - bottom);
m32 = -(zFar + zNear) / (zFar - zNear);
m33 = 1.0f;

For a reference, see here: http://www.songho.ca/opengl/gl_projectionmatrix.html#ortho

EDIT:
Also please note that the first index of the ‘m’ fields of a matrix denotes the column of the matrix and the second index denotes the row.
This has nothing to do with column-major or row-major, but is just a convention how JOML names the indices, since when linearizing the matrix into memory, like in a ByteBuffer/FloatBuffer, it does use column-major ordering, as expected by OpenGL.

Thanks, changing it to call setOrtho() instead works.