[Python-talk] mat3d error
Python
python at venix.com
Thu Sep 11 14:56:49 EDT 2008
On Thu, 2008-09-11 at 13:48 -0400, Labitt, Bruce wrote:
> Hmm, in this case it may be an error in someone else's code.
OK, I'm still suspicious of the code you're running even if it was
simply downloaded demo code. You seem to have enough stuff working to
have gotten all the big pieces installed OK.
Having said that, using a mix of distro-installs, easy-install, and
manual package installs can create version issues. Fedora packages PIL
as python-imaging and python-imaging-tk. Could the PIL warnings about
Tcl/Tk libraries reflect not using both packages?
Isn't Tkinter handling the screen that lets you see and manipulate the
image? Could tracking down the error within glReadPixels help with
diagnosing a mismatched version problem? Is the demo mat3d.py in sync
with the pyOpenGL that you are running? A type error sounds to me like
the function parameters changed so that the caller and callee are out of
step.
I've got PyOpenGL installed and the line number 323 matches to my
images.py file. Digging in a little, the call really seems to go on to
this code in raw/GL/__init__.py
# /usr/include/GL/gl.h 1528
glReadPixels = platform.createBaseFunction(
'glReadPixels', dll=platform.GL, resultType=None,
argTypes=[GLint,GLint,GLsizei,GLsizei,GLenum,GLenum,POINTER(GLvoid)],
doc='glReadPixels( GLint(x), GLint(y), GLsizei(width), GLsizei(height), GLenum(format), GLenum(type), POINTER(GLvoid)(pixels) ) -> None',
argNames=('x', 'y', 'width', 'height', 'format', 'type', 'pixels'),
)
So the third argument is supposed to be GLsizei (??)
constants.py has
GLsizei = _defineType( 'GLsizei', ctypes.c_int, int )
Could you add the line
print "width is:", width
into the mat3d.py file to send some debugging info to the console?
--
Lloyd Kvam
Venix Corp
DLSLUG/GNHLUG library
http://dlslug.org/library.html
http://www.librarything.com/catalog/dlslug
http://www.librarything.com/rsshtml/recent/dlslug
http://www.librarything.com/rss/recent/dlslug
More information about the Python-talk
mailing list