PIL Image to PyOpengl glDrawPixels

Mike C. Fletcher mcfletch at rogers.com
Fri Jan 4 05:33:18 CET 2002


You can find a working example of loading an image with PIL and then 
using it with glDrawPixels here (all one line).

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/pyopengl/OpenGLContext/tests/gldrawpixels.py?rev=1.6&content-type=text/plain

Sorry, a bit busy at the moment to go through and figure out what's 
going on in your code, post if you still have problems after looking at 
the example.

HTH,
Mike


Joe Connellan wrote:

> Hi,
>     I'm opening an image using
...

> How do I go about formating this for the following glDrawPixels?
> 
> glDrawPixels(self.im.size[0], self.im.size[1], GL_RGB, GL_INT,  imgData)
...






More information about the Python-list mailing list