I've tried using column major and/or exchanging the two last elements without success. The mesh shows fine with the array version but not my matrix.
float fFrustumScale = 1.0f; float fzNear = 0.5f; float fzFar = 3.0f;
float theMatrix[16];
memset(theMatrix, 0, sizeof(float) * 16);
matrix<float> bmatrix(4,4);
theMatrix[0] = fFrustumScale;
theMatrix[5] = fFrustumScale;
theMatrix[10] = (fzFar + fzNear) / (fzNear - fzFar);
theMatrix[14] = (2 * fzFar * fzNear) / (fzNear - fzFar);
theMatrix[11] = -1.0f;
bmatrix(0,0) = fFrustumScale;
bmatrix(1,1) = fFrustumScale;
bmatrix(2,2) = (fzFar + fzNear) / (fzNear - fzFar);
bmatrix(2,3) = (2 * fzFar * fzNear) / (fzNear - fzFar);
bmatrix(3,2) = -1.0f;
glUseProgram(program);
//glUniformMatrix4fv(perspectiveMatrixUnif, 1, GL_FALSE, theMatrix); //This works
glUniformMatrix4fv(perspectiveMatrixUnif,1, GL_FALSE, &bmatrix.data()[0]);//Doesn't
Thanks in advance.