On or about Sun, Aug 16, 2009 at 7:57 PM, Richard Jones indited:
> on_draw will be invoked when you need to render the window contents -
> when the window contents are made dirty by some action external to
> your program (window min/max/resize/obscure). If your scene is not
> animated then on_draw is the way to go.

It is also a matter of separation of concerns.
on_draw is for updating the window(s).
your clock-driven events (if you have any), are for modifying/updating
your world.

If you are familiar with the Model View Controller paradigm:
    on-draw is part of the View
    a clock driven update is part of the Model.
    on_mouse_event (and others) is part of the Controller.

That doesn't mean you can't mush a bunch of stuff into one function,
but doing so isn't usually the cleanest way to go.

-Doug

--~--~---------~--~----~------------~-------~--~----~
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