back next

The ImageGL Module

(PIL Plus) (May be added to 1.2) The ImageGL module allows you to copy PIL images to OpenGL texture objects. The module is designed to be used together with a separate OpenGL binding, such as PyOpenGL.

Examples #

Creating an OpenGL texture
import Image, ImageGL

... set up an OpenGL context ...

factory = ImageGL.TextureFactory()

im = Image.open("example.jpg")

texture = factory.maketexture(im)
texture.draw((0, 0, 100, 100))
 

[comment on/vote for this article]

A Django site. this page was rendered by a django application in 0.01s 2012-02-11 04:58:22.313799. hosted by webfaction.