[OpenGL] Having trouble with matrices [FIXED]

So I’ve been working on a couple of simple camera classes to try and improve my understanding of the matrix transformations, however my square isn’t rendering in view. It’s definitely a problem with the matrices, because when I don’t do the matrix multiplication in the shader program, it renders as expected in NDC space. This is just orthographic projection by the way.

This is my resize method, which sets the projection matrix (super.resize simply calls glViewport):


public void resize(int x, int y, int width, int height) {
	super.resize(x, y, width, height);
	projection.overwrite(new float[] { 2f / width, 0f, 0f,
			(x * 2 + width) / width, 0f, 2f / height, 0f,
			(y * 2 + height) / height, 0f, 0f, 2f, 1f, 0f, 0f, 0f, 1f });
}

I get the combined projection and view matrices with this method; note that the scale, rotation and translation matrices are all identity matrices by default:


public Matrix4 update() {
	return projection.copy().multiply(scale).multiply(rotation)
			.multiply(translation).transpose(); // am I correct in thinking I should transpose the resulting matrix? I prefer to handle matrix operations row major, however since GLSL uses column major by default I thought I should be transposing it. I tried both transposing and leaving it as it is, neither time with success.
}

I’m thinking that it might be a problem with my order of multiplication, however I followed the order it states on this page.

Here’s my vertex shader, nothing special:


#version 150

in vec2 position;
uniform mat4 mvp;

void main() {
	gl_Position = mvp * vec4(position, 0.0, 1.0);
}

What am I doing wrong?