Consider this pseudo-code (partly from python, you’ll get the idea, I think):
A44 = matrix([\
[ 0.96126169, 0., 0.27563736, 0],\
[ 0.07597595, 0.96126169, -0.26495963, 0],\
[ -0.26495963, 0.27563736, 0.92402405, 0],\
[ 0, 0, 0, 1])
glMultMatrixf(Anew)
// Drawing some stuff works ok
model = glGetDoublev(GL_MODELVIEW_MATRIX)
print "model =
", model
// This prints the following out to screen:
//model =
//[[ 1. 0. 0. 0.]
// [ 0. 1. 0. 0.]
// [ 0. 0. 1. 0.]
// [ 0. 0. 0. 1.]]
// But why is it still identity matrix, like it's unaffected by multiplication???
And then I have another problem:
A44 = matrix([\
[ 0.96126169, 0., 0.27563736, 0],\
[ 0.07597595, 0.96126169, -0.26495963, 0],\
[ -0.26495963, 0.27563736, 0.92402405, 0],\
[ 0, 0, 0, 1])
glLoadMatrixd(Anew)
// Trying to draw some new things - don't work - nothing happens!
// And once again, when I try to print out current modelview matrix, I get 4x4 identity - why???
In the last case, I suspect that the A44 matrix I’ve given isn’t precise enough and then I suspect that the matrix isn’t orthogonal - hence nothing is drawn. Is that guess correct (that I need more digits to A44) ???