[ pyopengl-Bugs-2939786 ] glColor wrapper doesn't handle tuple of floats properly
"SourceForge.net" <[email protected]> Mon, 22 Feb 2010 20:30:51 +0000
| Newsgroups | gmane.comp.python.opengl.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #2939786, was opened at 2010-01-25 17:47
Message generated for change (Settings changed) made by mcfletch
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2939786&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: GL
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Mike C. Fletcher (mcfletch)
Summary: glColor wrapper doesn't handle tuple of floats properly
Initial Comment:
In the following fragment of exceptional.py
Either GLdoubleArray should be used or colorDispatch should refer to glColorXfv not glColorXdv. In simpler words types should match or there is no effect to glColor call
colorDispatch = {
3: annotations.glColor3dv,
4: annotations.glColor4dv,
}
def glColor( *args ):
"""glColor*f* -- convenience function to dispatch on argument type
dispatches to glColor3f, glColor2f, glColor4f, glColor3f, glColor2f, glColor4f
depending on the arguments passed...
"""
arglen = len(args)
if arglen == 1:
arg = arrays.GLfloatArray.asArray( args[0] )
function = glColorDispatch[arrays.GLfloatArray.arraySize( arg )]
return function( arg )
elif arglen == 2:
return simple.glColor2d( *args )
elif arglen == 3:
return simple.glColor3d( *args )
elif arglen == 4:
return simple.glColor4d( *args )
else:
raise ValueError( """Don't know how to handle arguments: %s"""%(args,))
Tested on Gentoo linux,
PyOpengl 3.0.1_beta1 and beta2
Python 2.6.4
email: [email protected]
----------------------------------------------------------------------
>Comment By: Mike C. Fletcher (mcfletch)
Date: 2010-02-22 15:30
Message:
Revision 346 in bzr should fix this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2939786&group_id=5988
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net