Hi Peter.

I had this problem before, also when using groups, and I used this solution.

>From the code of Batch, this seems to be the only way.

I think this should be exposed in the pyglet.graphics.Batch public API; 
added as issue 687 <https://code.google.com/p/pyglet/issues/detail?id=687>.

Cheers,
Jorge




On Wednesday, October 16, 2013 1:22:12 AM UTC+2, Peter Varo wrote:
>
> I'm having problems on updating the order of groups in a 
> pyglet.graphics.Batch. I don't want to use pyglet.graphics.OrderedGroups, 
> since I need the set_state() and unset_state() methods of the 
> pyglet.graphics.Group. (However I tried encapsulating a order-independent 
> Groups inside OrderedGroups and I tried to change the order of this group 
> later, but it just turned out that I still need to reorder them inside the 
> Batch object if any order property changed.
>
> So at the moment I'm switching the value of an underscored flag (which is 
> clearly not the best thing to do..) after I changed my subclassed Group 
> object's order property:
>
>     batch._draw_list_dirty = True
>
> So technically I'm forcing the Batch object to call 
> self._update_draw_list(). Well, it is working, but I don't think this is 
> the proper way to do this..
>
> Any suggestions?
>
> Thanks in advance!
>

-- 
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/groups/opt_out.

Reply via email to