[ pyopengl-Bugs-1920052 ] glMultMatrixf ignores array transpose

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #1920052, was opened at 2008-03-19 12:11
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1920052&group_id=5988

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: v3.0.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: glMultMatrixf ignores array transpose

Initial Comment:
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]

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1920052&group_id=5988

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.