View Full Version : Update Vertex list dynamicly

08-04-2005, 01:07 AM
Hi all. I'm too new in OpenGL programming.

So is it possible to add or reset some vertexs dynamicly ?

In the Torus sample (http://www.opengl.org/resources/code/basics/redbook/torus.c) How to update the vertex number. For exemple by pressing + or - keys

Thanx a lot.

08-04-2005, 01:43 AM
Instead of compiling a display list, slap your vertices into an array, then manipulate them however you want. Indexed arrays are better still.

Look at glDrawArrays and glDrawElements.