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!
Thomas


On 26 mar, 22:56, Thomas Woelz <[EMAIL PROTECTED]> wrote:
> Ok now it works. But the programming guide has a small typo, the
> method names to set and unset GL states are not just 'set' and
> 'unset', but set_state and unset_state.
>
> class BlendEnableGroup(pyglet.graphics.Group):
>     def set_state(self):
>         pyglet.gl.glEnable(pyglet.gl.GL_BLEND)
>
>     def unset_state(self):
>         pyglet.gl.glDisable(pyglet.gl.GL_BLEND)
>
> On 26 mar, 22:14, Thomas Woelz <[EMAIL PROTECTED]> wrote:
>
> > thanks Gary that helps a lot!
> > thanks Alex I'll check the guide!
--~--~---------~--~----~------------~-------~--~----~
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