Hi!
To answer your original question: don't know ;)
> Basically, I need to run the event loop at like 30Hz to deal with some
> non-GUI IO issues, but I don't want to force the windows to all re-
> paint at that rate -- the windows need to re-paint at a much lower
> minimum framerate, or in response to GUI events. If the idle loop was
> able to determine the reason for its awakening, this sort of thing
> would be a bit easier... (Right now, I just have the idle loop never
> call on_draw on any windows, and instead make the window event
> handlers call on_draw if that event causes the window to need a
> repaint.)
Maybe I misunderstand the question, but can't you just schedule your 30 hz task
to run:
pyglet.clock.schedule_interval(MyNonGuiIOIssues, 1/30)
and optionally also run your drawing thing on a lower rate:
pyglet.clock.schedule_interval(UpdateMyGUI, 0.1)
and also have an onDraw function (which I think is called automagically
whenever it needs to redraw your window):
@window.event
def on_draw():
window.clear()
label.draw()
Wouldn't that address most of the issues? That also nicely seems to seperate
the
tasks into seperate functions. But maybe this solution is not quite what you
want, since it's not an answer to your question :)
Cheers,
Laurens
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---