Hello,

I am drawing a label on top of a button. At the moment the text appears 
underneath the button (a quad). What is the best way to do this? Label has 
no Z co-ordinate, so it doesn't work if it's in the same batch. Is there a 
pyglet solution for z-ordering.

At the moment I disable DEPTH_TEST, I could also put it in a separate batch 
and use glTranslate. I could also change the Z-coordinate of the Rectangle 
in this particular case, but the buffer doesn't seem right for this at the 
moment.

self.rectangle = Rectangle(0, 0, self.width, self.height, self.batch)
self.label = pyglet.text.Label(label, x=self.width//2, y=0, 
width=self.width, height=self.height,
            anchor_x='center', anchor_y='bottom', multiline=False,
            color=(0, 0, 0, 255), batch=self.batch),

-- 
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 https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to