On Thursday 18 December 2003 12:36 am, David Boddie wrote: > On Wed, 17 Dec 2003 16:05:01, Tom Badran <[EMAIL PROTECTED]> wrote: > > File "/home/tb100/development/wizard/src/imagedisplay.py", line 61, in > > paintGL > > glTexImage2D(GL_TEXTURE_2D, 0, 3, tex.width(), tex.height(), 0, > > GL_RGBA, GL_UNSIGNED_BYTE, tex.bits() ) > > ValueError: expect source sequence > > > > This is basically copied from the documentation of QGLWidget so i assumed > > it would work ok. I have no idea what to do, any pointers would be > > brilliant. > > Working from memory, and after some experimentation, I found that the > glTexImage2D function in PyOpenGL appears to want a list of integers, at > least when supplied with the GL_UNSIGNED_BYTE constant. > > Getting this sort of information from a QImage object at the Python level > appears to be difficult since there isn't an equivalent to the > QImage.loadFromData method for saving image data. Wasn't this problem > discussed on this list recently?
I'm quite willing to add a toString() method to the sip.voidptr type which will take an argument specifying the number of bytes. I'm less willing to add anything more complicated. Phil _______________________________________________ PyKDE mailing list [EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde