would it be smarter for me to make a custom sprite class which overrided 
the _update_position method to update the depth as well? as of right now it 
only updates a v2f? then I could add a set_depth method.

On Monday, November 2, 2015 at 1:37:00 AM UTC, [email protected] wrote:
>
> No, you only need to add a vertex list once and it return's an object you 
> can update, then you only need to change the vertices of that object 
> whenever you want to move it around. So for example:
>
> self.images.append(self.render.add(4, pyglet.gl.GL_QUADS, group(1),
>         ('v3f',((16),(16),0.999996, 32+(16),(16),0.999996, 32+(16),32+(16
> ),0.999996, (16),32+(16),0.999996)),
>         ('t3f',(self.texture1.tex_coords))))
>
> #update vertices
> self.images[0].vertices = [(32),(32),0.999995, 32+(32),(32),0.999995, 32+(
> 32),32+(32),0.999995, (32),32+(32),0.999995]
>
> You can do the same with texture coordinates if you want to change the 
> current image its rendering:
>
> self.images[0].tex_coords = self.texture2.tex_coords
>
> However this only applies to the texture assigned to the vertex lists 
> group, if you want to draw an image thats associated with a different group 
> you'll have to migrate it to that group:
>
> self.render.migrate(self.images[0],pyglet.gl.GL_QUADS,group(2),self.render
> )
> self.images[0].tex_coords = self.texture2.tex_coords
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to