On Mar 5, 9:52 pm, "Drew Smathers" <[EMAIL PROTECTED]> wrote:
>
> Weird ... I didn't receive this email until now.  Why are you using
> the new iterator features of Python 2.5 to make your update an
> iterator?  ... It's a rather a mind-bending approach for this use
> case, and it certainly won't help you with performance (remember that
> send() is just a function call).  I suggest you  make `update' a
> normal normal method - not an iterator -  and take the time as a
> argument.  Or just set the time delta on the instance of Sparks and
> use it in `draw' to update positions and draw in one loop.  Also, If
> you have multiple particle systems, you might want to group them in a
> single state - the excess glEnable(), glDisable() calls can hurt
> performance in the pipeline.

Well, this is a little bit off-topic, but still...

Originally there was no particle class at all - just a generator. It
is very convenient way for me to describe a task, and I use it quite
often. By 'task' I mean literally task - something that should be done
in fire-and-forget way. In this exact case it was not just a particle
system, but specific application of it - a sparks mini explosion. As
phenomenon, it has begin state, end state and some transition logic.

I am not very good at explaining things, but what am trying to say, it
is not a particle system who use a task (generator in this case) to
update its state, but it is really a task who use a particle system
internally. And generators just happen to be most convenient (at least
for me) way to implement tasks.


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