OpenGL.contextdata | index /home/mcfletch/pylive/OpenGL/contextdata.py |
Storage of per-context values of various types
Because OpenGL needs persistent references to the
objects we're constructing to shadow Python objects,
we have to store references to the objects somewhere
For any given Python GUI library, we can use a weakref
to the library's representation of the GL context to
call the cleanup function. That means some per-GUI
library code in OpenGL (or the library), but it gives
us very natural operations within OpenGL.
Note: you can entirely disable use of this module by
setting:
OpenGL.ERROR_ON_COPY = True
OpenGL.STORE_POINTERS = False
before importing OpenGL functionality.
Modules | ||||||
|
Functions | ||
|
Data | ||
STORAGES = [{}, {}] __file__ = '/home/mcfletch/pylive/OpenGL/contextdata.pyc' __name__ = 'OpenGL.contextdata' __package__ = 'OpenGL' storedPointers = {} storedWeakPointers = {} |