Hi,
for remove all from a batch, must I "call VertexList.delete to remove a 
vertex list from the batch" as in documentation?
Is it correct simply re-create the batch?

Example:
from pyglet.gl import *

window = pyglet.window.Window(resizable=True)

the_batch = pyglet.graphics.Batch()# batch creation

the_batch.add_indexed(3, pyglet.gl.GL_TRIANGLES, None,
                              (0, 1, 2),
                              ('v2f', (10, 10, 10, 100, 100, 10)),
                              ('c3B', (255, 0, 0) * 3))

# ##########################
# Now I want delete all vertex list inside batch
# ##########################
the_batch = pyglet.graphics.Batch() # batch re-creation (empty old, create 
new)

the_batch.add_indexed(3, pyglet.gl.GL_TRIANGLES, None,
                              (0, 1, 2),
                              ('v2f', (10, 10, 70, 200, 200, 70)),
                              ('c3B', (0, 255, 0) * 3))

@window.event
def on_draw():
    window.clear()
    the_batch.draw()

pyglet.app.run()

Is it correct or this action leave in graphic card something?
Thanks,
Marco

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyglet-users/991f69c0-dd52-49de-869d-32b6f6666e3d%40googlegroups.com.

Reply via email to