Hi,
The program below, intended to override idle(), produces the errors
shown - on program exit only.  It doesn't like the flip().  Commenting
the flip() line out doesn't produce the errors, -while of course not
allowing anything to be drawn to screen.
(I've ran some updates, being on linux, - I didn't think I was getting
these errors yesterday.?)

#!/usr/bin/python

import pyglet

from pyglet import clock
from pyglet.window import *

from pyglet.event import *

window = pyglet.window.Window()

@window.event
def on_draw():
    window.clear()
    pyglet.text.Label("Hello").draw()


class myEventLoop(pyglet.app.EventLoop):
    def __init__(self):
        super(myEventLoop, self).__init__()

    def idle(self):
        clock.tick(poll=True)
        window.dispatch_event('on_draw')
        window.flip()
        return 0.1

event_loop = myEventLoop()
event_loop.run()


Traceback (most recent call last):
  File "10.2.py", line 27, in <module>
    event_loop.run()
  File "/usr/lib/python2.6/site-packages/pyglet/app/xlib.py", line 94,
in run
    sleep_time = self.idle()
  File "10.2.py", line 22, in idle
    window.flip()
  File "/usr/lib/python2.6/site-packages/pyglet/window/xlib/
__init__.py", line 800, in flip
    glx.glXSwapBuffers(self._x_display, self._window)
ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: wrong
type

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to pyglet-users@googlegroups.com
To unsubscribe from this group, send email to 
pyglet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to