Also, don't forget to invoke with 'python -O' - it's in the FAQ but I missed it when I started with pyglet, and it can make a huge difference (eg, several times faster).
On Apr 7, 3:11 am, Nate <[email protected]> wrote: > Ah. I feel foolish. Thanks for the response! > > On Apr 5, 2:42 pm, Alex Holkner <[email protected]> wrote: > > > On Mon, Apr 6, 2009 at 5:13 AM, Nate <[email protected]> wrote: > > > > Hi everyone, > > > > Just playing around with OpenGL and Python for game prototyping, and > > > trying to evaluate performance. > > > I've written the following very basic example, and I'm getting about > > > 7-10 FPS. Am I missing something here? > > > I'm using Python 2.6 and Pyglet 1.1.3 on two different computers: > > > > Intel Pentium D 2.6GHz, 4GB RAM, nVidia 8800 Ultra, Windows XP Pro > > > Intel Core 2 Duo 2.4GHz, 2GB RAM, nVidia 8600 M GT, Windows XP Pro > > > > The Pentium D has nVidia drivers from April 2nd, 2009 and the Core 2 > > > Duo has drivers from within the last year. > > > > import pyglet > > > > window = pyglet.window.Window() > > > fps = pyglet.clock.ClockDisplay() > > > label = pyglet.text.Label('Test', > > > font_name='Times New Roman', > > > font_size=36, > > > x=0, y=window.height//2, > > > anchor_x='center', anchor_y='center') > > > @window.event > > > def on_draw(): > > > window.clear() > > > label.x = (label.x + 10) % 640 > > > label.draw() > > > fps.draw() > > > > pyglet.app.run() > > > > Any help is greatly appreciated! Thanks > > > pyglet doesn't poll the event loop continuously unless you schedule a > > repeating event. Something like (just before calling run()): > > > def update(dt): > > pass > > pyglet.clock.schedule(update) > > > Alex. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
