OpenGLContext.extensionmanager
Object managing OpenGL extension loading for a Context
Functions
Classes
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)
__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.