When the vertex list is drawn, it happens relative to the current
origin, which you can change with glTranslatef.  By translating before
drawing the list (or batch) you can make the thing 'move'.  You can
use glLoadIdentity to reset the origin, or you can use glPushMatrix to
push, glPopMatrix to pop.  You can make your own group classes and put
everything in your scene into one batch and render it with a single
command - for example, a skybox, 3d geometry, and a 2-d HUD filled
with sprites.

Also, you can render to a texture.  The fixed_resolution.py example
does this, although not directly.  So you could create a sprite by
drawing and then animate it as a sprite.

-price



On Aug 19, 3:51 pm, Darel Finkbeiner <[EMAIL PROTECTED]>
wrote:
> I just got into pyglet this week.  Amazing stuff.
>
> One thing I would like to be able to do is "draw" into a sprite.  Or
> somehow transform my vertex commands into sprites so that I can do
> simpler animation....  currently I am updating the vertices by hand to
> achieve animation using the vertex.vertices[]
>
> Hopefully I'm just terribly naive about this, and didn't see how to do
> it.
>
> An example is, I have an image that I draw a 'bracket' around.  I move
> the image ( it slides into view ) so the bracket has to move with it.
> I draw the bracket initially with a vertex_list and then have to
> laboriously update each vertex by hand during the animation... while
> with the image I simply update a single value to move it. ( since it
> is a Sprite )
>
> Any hints on this?
>
> Oh, btw, great job on this package... it's really sweet.
--~--~---------~--~----~------------~-------~--~----~
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