I seem to be leaking memory when I draw text to a window. Or else I'm
doing it wrong. I'm running Leopard on intel hardware, in case that's
relevant.

Cheers,

Andrew Charles



#! /usr/local/bin/python
""" A test case to show we're leaking memory.
"""
from pyglet import window
from pyglet import font
from pyglet import clock
from pyglet import app
from pyglet.gl import *

WINDOW_WIDTH =86
WINDOW_HEIGHT =64
win = window.Window(WINDOW_WIDTH,WINDOW_HEIGHT,visible=False)
ft = font.load('Arial',12)
txt = font.Text(ft,"Hello pyglet")
txt.color = (1.0, 0.0, 0.0, 1.0)

def update(dt):
    glClear(GL_COLOR_BUFFER_BIT)
    txt = font.Text(ft,"I'm melting!")
    txt.draw()

def main():
    print pyglet.version
    win.set_visible()
    clock.schedule_interval(update,1/60.0)
    app.run()

main()

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Attachment: fontleak.py
Description: Binary data

Reply via email to