Hide
Stay up to dateembedded code automagically updates, each snippet and article has a feed Join Siafoo Now or Learn More

Using GLSL with PyOpenGL Atom Feed 0

In Brief It seems that some of the GLSL features are not implemented in older versions of PyOpenGL making it difficult to use shaders in PyOpenGL. This excellent piece of code from the pygame wiki defines the required features for shader development.... more

It seems that some of the GLSL features are not implemented in older versions of PyOpenGL making it difficult to use shaders in PyOpenGL. This excellent piece of code from the pygame wiki defines the required features for shader development.

Warning

You shouldn't need or use this code if you have a recent version of PyOpenGL (~3.0)

The main function draws the Utah Teapot with a rainbow sort of color, like this:

http://www.siafoo.net/image/29