Pyglet update batch data

Viewed 2057

I am using Pyglet batches to draw hundreds of quads. I would like to update the position of the verticies and the color values of the quads while the game is running. How can I do this? I have looked through a lot of the Pyglet Documentation and the closest thing I could find is:

    'c4f/static'

versus

    'c4f/dynamic'

My batch usage looks like this:

    self.batch.add(4, GL_QUADS, self.texture, 
      ('v3f/dynamic', self.verticies), ('c4f/dynamic', ((1.0,1.0,1.0,1.0)*4))

    ...
    def on_draw(self):
      self.batch.draw()
1 Answers
Related