[ 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 15:11
Message generated for change (Comment added) made by mcfletch
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: Closed
Resolution: Fixed
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]

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

>Comment By: Mike C. Fletcher (mcfletch)
Date: 2008-04-18 16:34

Message:
Logged In: YES 
user_id=34901
Originator: NO

Forgot to close.

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

Comment By: Mike C. Fletcher (mcfletch)
Date: 2008-04-18 16:34

Message:
Logged In: YES 
user_id=34901
Originator: NO

This appears to be fixed in current CVS.

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

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 the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
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.