Saturday, December 8, 2012

Vertex Array Objects in PyOpenGL

It has come to my attention that there aren't any good examples available of how to use vertex array objects in PyOpenGL. 

Vertex Array Objects (VAOs) allow all the attributes and buffers needed to draw an object to be stored during initialization and called back whenever the object needs to be drawn. This can speed up the rendering process and result in cleaner code.

To read more about VAOs see Learning Modern 3D Graphics Programming - Chapter 5

Here's an example of using VAOs in PyOpenGL. https://gist.github.com/4243336