Hi,
The following snippet works fine:
import pyglet
> class Figure(pyglet.window.Window):
ID = 0
> def __init__(self):
> Figure.ID += 1
> super(Figure, self).__init__(caption='fig' + str(Figure.ID))
> self.fps = pyglet.clock.ClockDisplay()
> def on_draw(self):
> self.clear()
> self.fps.draw()
> Figure()
> Figure()
> pyglet.app.run()
However, if I replace "pyglet.app.run()" with my own event loop:
while True:
> pyglet.clock.tick()
> for window in pyglet.app.windows:
> window.switch_to()
> window.dispatch_events()
> window.dispatch_event('on_draw')
> window.flip()
then the application hangs (before you ask: I need to use my own event loop
for my own application).
I use Anaconda Python 2.7 with Pyglet 1.2.7 on Windows 7.
Input appreciated!
Hugo
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.