[ pyopengl-Bugs-3441875 ] Unable to send null pointer (or zero) to glTexSubImage()

SourceForge.net <[email protected]> Thu, 24 Nov 2011 12:27:51 -0800
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #3441875, was opened at 2011-11-24 12:27
Message generated for change (Tracker Item Submitted) made by fizzgig
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=3441875&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Marcus Lindblom (fizzgig)
Assigned to: Mike C. Fletcher (mcfletch)
Summary: Unable to send null pointer (or zero) to glTexSubImage()

Initial Comment:
When updating a texture from a PBO, the value for pixels is an offset into the PBO.

This cannot be done using the pythonic API in PyOpenGL. (it fails to convert None to an array, and a zero-int is treated as a small array, yielding an gl error)

The workaround is to use the raw api thusly:

 raw.GL.glTexSubImage2D(GL.GL_TEXTURE_2D, 0, 0, 0, width, height, GL.GL_BGR, GL.GL_UNSIGNED_BYTE, POINTER(ctypes.c_ubyte)())



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=3441875&group_id=5988

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net