On Mar 25, 2:48 pm, "Alex Holkner" <[EMAIL PROTECTED]> wrote:
> On Wed, Mar 26, 2008 at 1:19 AM, Ben Sizer <[EMAIL PROTECTED]> wrote:
>
> >  So, what you're saying is that pyglet makes the assumption that it's
> >  quicker to rebuild the vertex array whenever an object moves (which
> >  you assume is infrequently) than to explicitly translate every object
> >  every frame, right?
>
> The vertex array will contain colour, position and texture coordinate
> data for every sprite in the same group and batch.  Only the sections
> of the vertex array that need to be updated are modified (the vertex
> array is not "rebuilt" as you suggest).
>
> I guarantee that even in the worst case where every sprite is moving
> every frame it will be much faster than calling glTranslate on each
> sprite (which involves the overhead of at least one OpenGL/ctypes
> call, and an OpenGL state change).

Ok, I'll take your word for it, though the usual wisdom is typically
to avoid changing geometry and to translate and rotate it as needed.
Perhaps that only really applies to VBOs?

I'm just responding speculatively to the first post and replies to it,
without looking at the source. (Sadly I still can't resolve pyglet.org
from my workplace, even though I can reach it at home. I've asked
someone to check our DNS...)

--
Ben Sizer

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