Another thing to be aware of, though I don't know if it causes your problem,
is that pyglet's text rendering can mess up some texture state. I think this
is either a bug in pyglet, or a limitation that should be documented, but I
wasn't sure enough of the tradeoffs involved in fixing it within pyglet (for
all uses of text, though it only matters for some rare uses) to report it as
a bug. If someone more knowledgeable than me decides it's really a bug and
should be fixed in pyglet, that fix would be easy...
Anyway, in my own code I've worked around this by rendering my text inside a
batch using this Group:
class TextGroup(pyglet.graphics.Group):
"encapsulate GL state leakage caused by bugs(?) in pyglet.text.Label"
def set_state(self):
glPushAttrib(GL_TEXTURE_BIT) # prevents leakage of change to texture
clamping
def unset_state(self):
glPopAttrib()
pass
I don't recall exactly what texture state changes are leaked
by pyglet.text.Label, except that they included some edge-clamping (vs
wraparound) settings (that affect how texture coordinates are interpreted).
- Bruce Smith
On Thu, Oct 21, 2010 at 6:59 PM, B W <[email protected]> wrote:
> Awesome. I am now convinced to learn batches, rather than put them off. And
> the comments and info about matrices were most useful.
>
> I appreciate everyone's feedback. Cheers. :)
>
> Gumm
>
>
--
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.