On Thu, Mar 27, 2008 at 1:08 PM, Thomas Woelz <[EMAIL PROTECTED]> wrote:
>
>  The programming guide says that OrderedGroup doesn't set the state,
>  but I'm not sure I understand why it was written since it is a
>  subclass of Group, and the set_state and unset_state methods can also
>  be set. It also works:
>
>  class BlendEnableOrderedGroup(pyglet.graphics.OrderedGroup):
>
>     def set_state(self):
>         pyglet.gl.glEnable(pyglet.gl.GL_BLEND)
>
>     def unset_state(self):
>         pyglet.gl.glDisable(pyglet.gl.GL_BLEND)
>
>  background =  BlendEnableOrderedGroup(0)
>  foreground =  BlendEnableOrderedGroup(1)
>
>  Sorry for my newbieness. Again, thanks a lot!

OrderedGroup implements a __cmp__ method to ensure vertex lists are
drawn in the specified order.  See "Sorting vertex lists" in
http://pyglet.org/doc/1.1/programming_guide/batched_rendering.html

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