Bases: object
Used when many subscribers would to recieve a function call from a single sender.
Subscribe by in-place-add (+= or __iadd__) a callable of the right signature. e.g:
def handler(this, that):
pass
event = Event()
event += handler
event.fire(1, 2)
The .fire call will invoke handler, passing 1 and 2, and will also invoke all other subscribers to this event.
Wrap any OpenGL functions which are fiddly to access via the raw bindings.
Bases: object
Application-wide options are stored in this object’s attributes. These are populated at start-up by a rough-and-ready check of command-line args. One day they might also take config files into account, to allow persistance of option changes by the user.
vsync: Boolean, default to True. synchronise screen refreshes to monitor. Setting this to True will limit framerate to your monitor refresh rate (e.g. 60fps), which is likely what you want unless you are performance testing. Setting it to False will increase framerate, but not visibly (since your monitor cannot display the extra frames) and will introduce ‘tearing’. Note that some video drivers have settings which override this value.
fullscreen: boolean, default to True. If false, display in a window.
fps: Display frames per second in lower-left of screen.
Access to all application path values should go via this module. In particular, use this module instead of using __file__ to locate resources, since resources will be separated from source code under some circumstances (e.g. when installed from an rpm.) See excellent talk on cross-platform development using these ideas at: http://us.pycon.org/2010/conference/schedule/event/38/