Pyglet doesn't automatically clear the screen... If you don't call
window.clear or glClear it should work.

import pyglet
import random
window = pyglet.window.Window()
window.clear()
@window.event
def on_draw():
    w, h = window.width, random.randrange(window.height)
    pyglet.graphics.draw(2, pyglet.gl.GL_LINES,
                         ('v2f', [0, h, w, h]),
                         ('c4B', [255, 0, 0, 255] * 2))
pyglet.clock.schedule(lambda dt: None)
pyglet.app.run()

On Nov 15, 1:57 am, Tristam MacDonald <[email protected]> wrote:
> On Sat, Nov 14, 2009 at 8:28 PM, val <[email protected]> wrote:
>
> > You can use a frame buffer (look for FBO in this mailing list and
> > you'll get some code).
>
> Or you can implement a replacement for pyglet.app.run(), which doesn't call
> window.clear() every frame.
>
> --
> Tristam MacDonaldhttp://swiftcoder.wordpress.com/
--~--~---------~--~----~------------~-------~--~----~
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