OpenGLContext.extensionmanager
index
p:\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...
 
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 and non-method functions defined here:
__dict__ = <dict-proxy object at 0x07155BF8>
__doc__ = 'Object managing OpenGL extension loading and ini...al python module representing\n\t\t\tthe extension)\n\t'
__module__ = 'OpenGLContext.extensionmanager'
__weakref__ = <member '__weakref__' of 'ExtensionManager' objects>

Methods inherited from object:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__hash__(...)
x.__hash__() <==> hash(x)
__reduce__(...)
helper for pickle
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__str__(...)
x.__str__() <==> str(x)

Data and non-method functions inherited from object:
__class__ = <type 'type'>
__new__ = <built-in method __new__ of type object at 0x1E0BD978>
T.__new__(S, ...) -> a new object with type S, a subtype of T
 
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