glMultMatrixf ignores transpose operations applied to matrices. presumably transpose just sets a bit and doesn't change the array in memory?
is there a workaround other than transposing the matrix by hand in python?
I am running pyopengl version 3.0.0a6 on with python 2.5.1 on ubuntu 7.10.
in the following code fragment I create an identity matrix, set the x offset to be 20 and then transpose it before feeding it to glMultMatrixf. the glMultMatrixf call seems to ignore the preceding transpose operation:
[code]
m = glGetFloatv( GL_MODELVIEW_MATRIX )
print "matrix before multiply:\n%s" % str(m)
t = eye(4)
t[3,0] = 20.0
print "transform matrix before transpose:\n%s" % str(t)
# the following glMultMatrixf call ignores this transpose
t = t.T
print "multiplying with transform matrix:\n%s" % str(t)
glMultMatrixf( t )
m = glGetFloatv( GL_MODELVIEW_MATRIX )
print "matrix after multiply:\n%s\n\n" % str(m)
[/code]
output:
[code]
matrix before multiply:
[[ 1. 0. 0. 0.]
[ 0. 1. 0. 0.]
[ 0. 0. 1. 0.]
[ 0. 0. -603. 1.]]
transform matrix before transpose:
[[ 1. 0. 0. 0.]
[ 0. 1. 0. 0.]
[ 0. 0. 1. 0.]
[ 20. 0. 0. 1.]]
multiplying with transform matrix:
[[ 1. 0. 0. 20.]
[ 0. 1. 0. 0.]
[ 0. 0. 1. 0.]
[ 0. 0. 0. 1.]]
matrix after multiply:
[[ 1. 0. 0. 0.]
[ 0. 1. 0. 0.]
[ 0. 0. 1. 0.]
[ 20. 0. -603. 1.]]
[/code]
Logged In: YES
user_id=34901
Originator: NO
This appears to be fixed in current CVS.
Logged In: YES
user_id=34901
Originator: NO
Forgot to close.