tags:

views:

67

answers:

1

I want to draw a scene and sequentially add lines to it. But pyglet keeps updating without control :( , so all I get is blinks

from pyglet.gl import *

window=pyglet.window.Window()

def drawline():
    ...

@window.event
def on_draw():
    drawline()

pyglet.app.run()

should I change the decorator(if there exist options) or what? Thanks!

A: 

You'll need to draw your lines each time the window is redrawn as they won't be retained. You're probably better off using batches of vertex lists and adding to them. See here and here for details.

Rod Hyde