I'm trying to mathematically follow the coordinates of my ModelView matrix (and some other matrices) in my program after I've applied various transformations. I'd like to get the program to output these coordinates, but I can't quite get there.
modelViewMatrix = GLKMatrix4MakeTranslation(-1.5f, 1.25f, -4.0f);
modelViewMatrix = GLKMatrix4Scale(modelViewMatrix, 2.75, 2, 0);
GLfloat MVMatrix[16];
if (not_printed) {
glGetFloatv(GL_MODELVIEW_MATRIX, MVMatrix);
for (int i=0; i<16; i++) {
printf("%f ", MVMatrix[i]);
}
}
not_printed = 0;
The output from this is simply a sequence of 16 0.0 values (e.g. 0.0, 0.0, ..., 0.0).
How do I get the values of my matrix to output to the console? Thanks!