I followed this post to build the GluLookAt type matrix.
Method calculateLookAtMatrix(glm::vec3 eye, glm::vec3 center, glm::vec3 up)
glm::vec3 zaxis = glm::normalize(center - eye);
glm::vec3 xaxis = glm::normalize(glm::cross(up, zaxis));
glm::vec3 yaxis = glm::cross(zaxis, xaxis);
lookAtMatrix[0][0] = xaxis.x;
lookAtMatrix[0][1] = yaxis.x;
lookAtMatrix[0][2] = zaxis.x;
lookAtMatrix[1][0] = xaxis.y;
lookAtMatrix[1][1] = yaxis.y;
lookAtMatrix[1][2] = zaxis.y;
lookAtMatrix[2][0] = xaxis.z;
lookAtMatrix[2][1] = yaxis.z;
lookAtMatrix[2][2] = zaxis.z;
lookAtMatrix[3][0] = glm::dot(xaxis, -eye);
lookAtMatrix[3][1] = glm::dot(yaxis, -eye);
lookAtMatrix[3][2] = glm::dot(zaxis, -eye);
lookAtMatrix[3][3] = 1;
I calculate that CPU side and pass it in to the shader as a uniform in the same way as the perspective matrix.
The shader looks like this.
gl_Position = lookAtMatrix * position * perspectiveMatrix;
If pass in the lookAtMatrix as the identity matrix the scene is rendered correctly, however using the code above to set the matrix as ...
eye(0.0f,0.0f,10.0f);
center(0.0f,0.0f,0.0f);
up(0.0f,0.0f,1.0f);
results in a blank scene. The scene is a grid 10x10 drawn on X/Y, I therefore would have been expecting a zoomed out view of the scene.
(I have played about with the rows and cols but I am 99.9% sure they are fine, as the perspective matrix is fine)