Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想画一个场景并依次添加线条。但是 pyglet 在不受控制的情况下不断更新 :( ,所以我得到的只是眨眼
from pyglet.gl import * window=pyglet.window.Window() def drawline(): ... @window.event def on_draw(): drawline() pyglet.app.run()
我应该更改装饰器(如果存在选项)还是什么?谢谢!
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.