Hello,
I'm new to pyglet and opengl. I have gotten an ok demo working,
but I cannot get 2D text to display on the screen in from of my 3D
polygons. I'd like it to be something like a score, to always be in
the same place. I think the text actually appears stationary, but I
have to zoom out to see it, like it's at z=0.0. If I zoom out just
past it, it disappears, though, and sometimes I can't even find it.
Any suggestions?
Here's some of my code:
@win.event
def draw():
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
repositionScene()
my_triangle.draw()
for b in my_boxes:
b.draw()
handleState()
label = pyglet.text.Label('Hello pyglet', font_name='Arial',
font_size=12, color=(255, 0, 0, 255))
label.draw()
def repositionScene():
glLoadIdentity();
glRotatef( my_cam.getAngle()[Camera.Y_AXIS], 0.0, 1.0, 0.0)
glRotatef( my_cam.getAngle()[Camera.X_AXIS], 1.0, 0.0, 0.0)
glTranslatef( *my_cam.getPos() )
Thanks,
Josh
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---