[PyOpenGL-Devel] [ pyopengl-Bugs-1920052 ] glMultMatrixf ignores array transpose
Brought to you by:
mcfletch
|
From: SourceForge.net <no...@so...> - 2008-04-18 20:34:11
|
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: Open >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 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 |