[ pyopengl-Bugs-2561765 ] Wrong image size for glReadPixels()
"SourceForge.net" <[email protected]> Tue, 03 Feb 2009 19:26:09 +0000
| Newsgroups | gmane.comp.python.opengl.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #2561765, was opened at 2009-02-03 19:26 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2561765&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: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Andrew Straw (astraw) Assigned to: Nobody/Anonymous (nobody) Summary: Wrong image size for glReadPixels() Initial Comment: I've been tracking down an error with the Vision Egg and PyOpenGL 3. (This code works fine with PyOpenGL 2.) The code that led me to this issue is line 476 of VisionEgg/Core.py [1], which is a call to glReadPixels(). Basically, doing glReadPixels with a format of GL_BGRA and type of GL_UNSIGNED_INT_8_8_8_8_REV returns an NxMx4 array of type uint32. I think this should either be an NxM(x1) array of type uint32 or an NxMx4 array of type uint8. The code at issue seems to be in OpenGL.images.createTargetArray(). It is responsible for creating the mis-sized array. I hesitate to suggest a patch, since I'm not sure what the optimal solution is, but this is at least a change of behavior since PyOpenGL 2. I am including a test which hopefully clarifies my thinking about the proper size of the array. [1] http://visionegg.org/trac/browser/tags/release_1.1.2/VisionEgg/Core.py#L476 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2561765&group_id=5988 ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net