I am drawing using OpenGL vertex arrays. I have a python list that
stores the vertex data and I create a ctypes array that points to the
list as described in pyglet's programming guide.

vertices_gl = (GLfloat * len(vertices))(*vertices)

This works well to create the vertex array. But now I decide to add
more vertices to the python list. How do I update the ctypes array to
reflect the added vertices? I tried creating a new array, but this
leaks memory and causes incorrect drawing at random times. I tried
calling the ctypes function resize() on the array, but that made the
drawing problems worse. I searched for ctypes tutorials, but most of
the tutorials and documentation focus on loading libraries instead of
resizing arrays.

Mark

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to