[ pyopengl-Bugs-1744414 ] ctypes.ArgumentError in glReadPixels
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.python.opengl.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1744414, was opened at 2007-06-27 15:04
Message generated for change (Comment added) made by mcfletch
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1744414&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: v3.0.0
>Status: Closed
>Resolution: Out of Date
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Mike C. Fletcher (mcfletch)
Summary: ctypes.ArgumentError in glReadPixels
Initial Comment:
We're running problems with glReadPixels throwing an exception. Here's the backtrace:
Traceback (most recent call last):
File "/store/home/mukaissi/MetNetVis/MetNetVis/UI/graphdrawwidget.py", line 155, in mousePressEvent
index=GL.glReadPixels(event.x,event.y,1,1,GL.GL_RGB,GL.GL_UNSIGNED_BYTE)
File "/store/home/mukaissi/software/PyOpenGL-3.0.0a6/OpenGL/GL/images.py", line 279, in glReadPixels
ctypes.c_void_p( arrayType.dataPointer(array))
ctypes.ArgumentError: argument 1: <type 'exceptions.TypeError'>: wrong type
Adding a few prints to see the types of the involved variables they seem to be ok:
array: [[[0 0 0]]] <type 'numpy.ndarray'>
arrayType: <class 'OpenGL.arrays.arraydatatype.GLubyteArray'> <type '_ctypes.PointerType'>
dataPointer: 20509152 <type 'long'>
This is using 3.0.0a6 on an x86_64 (RHEL) system.
----------------------------------------------------------------------
>Comment By: Mike C. Fletcher (mcfletch)
Date: 2008-01-19 12:06
Message:
Logged In: YES
user_id=34901
Originator: NO
With current CVS on AMD64 Gentoo the function appears to be working
correctly (as tested with the OpenGLContext/tests/saveimage.py script).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1744414&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