OpenGLContext.extensionmanager
index
/home/mcfletch/pylive/OpenGLContext/extensionmanager.py

Object managing OpenGL extension loading for a Context

 
Modules
       
string
traceback

 
Classes
       
object
ExtensionManager

 
class ExtensionManager(object)
    Object managing OpenGL extension loading and initialisation
 
There are a large number of OpenGL extensions available,
and it is generally necessary to initialize the extension
for each OpenGL context.  This class attempts to provide
a generic interface for instantiating and querying for the
extension's current status with regard to a particular
Context.
 
This object is normally accessed via ContextObject.extensions,
which is set up by the setupExtensionManager method of the
base Context class, which is called before the OnInit method.
 
Attributes:
    modules -- mapping from "cleaned" module name to module
        object (that is, the actual python module representing
        the extension)
 
  Methods defined here:
__init__(self)
Initialise the extension manager
 
This implementation simply creates the modules attribute.
hasExtension(self, moduleName)
Query whether an extension is currently loaded
 
moduleName -- the "cleaned" module name being queried
initExtension(self, moduleName)
Initialise an extension module for the context
 
This must be called within a "setcurrent" environment
to ensure that the owning context is the one that's
initialised...
 
moduleName -- the module name being queried, will be
    "cleaned" before processing.  Format should be:
        "GLU.EXT.object_space_tess"
        "GL.ARB.multitexture"
    that is, with OpenGL. prepended, represents the
    Python module for the extension implementation.
 
If the extension has already been loaded, this just
returns a pointer to the already existing module.
listGL(self)
Return list of OpenGL extension names
listGLU(self)
Return list of GLU extension names
 
XXX This is currently broken with PyOpenGL 2.0.1
listWGL(self)
Return list of WGL extension names

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
cleanModuleName(moduleName)
Get a valid PyOpenGL module name for given string
 
Needs to deal with '_' vs '.' creating a result that's
OpenGL.Package.SubPackage.extension_name
importFromString(moduleName)
Import a fully-specified extension-module name
initialiser(moduleName)
Compute the initialiser function name from module name

 
Data
        GLU_EXTENSIONS = GLU_EXTENSIONS
GL_EXTENSIONS = GL_EXTENSIONS
__file__ = '/home/mcfletch/pylive/OpenGLContext/extensionmanager.pyc'
__name__ = 'OpenGLContext.extensionmanager'
__package__ = 'OpenGLContext'
glGetString = <_FuncPtr object at 0x25902c0>
gluGetString = <CFunctionType object at 0x28ecd50>
log = <logging.Logger instance at 0x360b0e0>