On 9/13/08, josch <[EMAIL PROTECTED]> wrote:
>
>  As all begins to get bigger I need some additional advice.
>  For my viewport I manage vertext lists that i only need to modify in
>  their texture or coordinates to move around the map or do animations.
>  I only need to delete them and create new vertex lists with
>  batch.add() when the window is being resized.
>  the rest of the time i only access the vertex lists and modify their
>  parameters (tex_coords and vertices).
>  this is quite fast but the problem comes in when i need more than one
>  texture to draw my map because i can no longer simply swap the
>  textureregion when moving and animating as eventually the texture
>  itself has to change too.
>  as i understand it now i have to do a batch.add() again to attach a
>  TextureGroup that will do this for me.
>  again this works fine but calling batch.add() for every movement is
>  MUCH slower than just switching out the textureregions as i did
>  before.
>  any ideas on that?

You can actually migrate a vertex list from one group to another, but
this has a similar performance penalty.  Ideally you would keep frames
of an animation in a single texture; vertices can then keep their
group.  There's no problem with having multiple groups in a batch;
this is actually quite an efficient way of managing the drawing of
several textures.

Alex.

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