Hi!
I'm currently drawing text in 3D, which works fine, except for setting
the z-coordinate of the Text() object. According to the API reference,
the Text.__init__ method has a "z" keyword argument, but in the source
of pyglet/font/__init__.py, the "z" isn't used anywhere.
Below is the svn diff of a simple patch I wrote to fix this:
Index: pyglet/font/__init__.py
===================================================================
--- pyglet/font/__init__.py (Revision 1731)
+++ pyglet/font/__init__.py (Arbeitskopie)
@@ -323,6 +323,7 @@
self.color = color
self.x = x
self.y = y
+ self.z = z
self.leading = 0
self._layout_width = width
self._halign = halign
@@ -397,7 +398,7 @@
glEnable(GL_TEXTURE_2D)
glColor4f(*self.color)
glPushMatrix()
- glTranslatef(0, y, 0)
+ glTranslatef(0, y, self.z)
for start, end in self.lines:
width = self._glyph_string.get_subwidth(start, end)
Andy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---