For anyone it may be useful for, here is my menus.py file:

#!/usr/bin/python

from pyglet.gl import *
import pyglet

class hud():
    def __init__(self):
        self.infotext = pyglet.text.Label('Hello, world',
                          font_name='Free Serif',
                          font_size=36,
                          x=10, y=20)
        
    def draw(self, width, height):
        glPushMatrix()
        glViewport(0, 0, width, height)
        glMatrixMode(gl.GL_PROJECTION)
        glLoadIdentity();
        glOrtho(0, width, 0, height, -1, 1)
        glMatrixMode(gl.GL_MODELVIEW)
        self.infotext.draw()
        glPopMatrix()

-- 
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 http://groups.google.com/group/pyglet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to