OpenGL.platform.baseplatform
index
/home/mcfletch/pylive/OpenGL/platform/baseplatform.py

Base class for platform implementations

 
Modules
       
ctypes
OpenGL.platform.ctypesloader
OpenGL.logs
sys
OpenGL

 
Classes
       
object
BasePlatform
_CheckContext
_NullFunctionPointer
_DeprecatedFunctionPointer

 
class BasePlatform(object)
    Base class for per-platform implementations
 
Attributes of note:
 
    EXPORTED_NAMES -- set of names exported via the platform 
        module's namespace...
 
    GL, GLU, GLUT, GLE, OpenGL -- ctypes libraries
 
    DEFAULT_FUNCTION_TYPE -- used as the default function 
        type for functions unless overridden on a per-DLL
        basis with a "FunctionType" member
    
    GLUT_GUARD_CALLBACKS -- if True, the GLUT wrappers 
        will provide guarding wrappers to prevent GLUT 
        errors with uninitialised GLUT.
    
    EXTENSIONS_USE_BASE_FUNCTIONS -- if True, uses regular
        dll attribute-based lookup to retrieve extension 
        function pointers.
 
  Methods defined here:
CurrentContextIsValid(self)
Return boolean of whether current context is valid
GetCurrentContext(self)
Retrieve opaque pointer for the current context
checkExtension(self, name)
Check whether the given extension is supported by current context
constructFunction(self, functionName, dll, resultType=<class 'ctypes.c_int'>, argTypes=(), doc=None, argNames=(), extension=None, deprecated=False)
Core operation to create a new base ctypes function
 
raises AttributeError if can't find the procedure...
copyBaseFunction(self, original)
Create a new base function based on an already-created function
 
This is normally used to provide type-specific convenience versions of
a definition created by the automated generator.
createBaseFunction(self, functionName, dll, resultType=<class 'ctypes.c_int'>, argTypes=(), doc=None, argNames=(), extension=None, deprecated=False)
Create a base function for given name
 
Normally you can just use the dll.name hook to get the object,
but we want to be able to create different bindings for the 
same function, so we do the work manually here to produce a
base function from a DLL.
createExtensionFunction = createBaseFunction(self, functionName, dll, resultType=<class 'ctypes.c_int'>, argTypes=(), doc=None, argNames=(), extension=None, deprecated=False)
errorChecking(self, func, dll)
Add error checking to the function if appropriate
finalArgType(self, typ)
Retrieve a final type for arg-type
functionTypeFor(self, dll)
Given a DLL, determine appropriate function type...
getGLUTFontPointer(self, constant)
Retrieve a GLUT font pointer for this platform
install(self, namespace)
Install this platform instance into the platform module
nullFunction(self, functionName, dll, resultType=<class 'ctypes.c_int'>, argTypes=(), doc=None, argNames=(), extension=None, deprecated=False)
Construct a "null" function pointer
safeGetError(self)
Safety-checked version of glError() call (checks for valid context first)
wrapContextCheck(self, func, dll)
Wrap function with context-checking if appropriate
wrapLogging(self, func)
Wrap function with logging operations if appropriate

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

Data and other attributes defined here:
DEFAULT_FUNCTION_TYPE = None
EXPORTED_NAMES = ['GetCurrentContext', 'CurrentContextIsValid', 'safeGetError', 'createBaseFunction', 'createExtensionFunction', 'copyBaseFunction', 'GL', 'GLU', 'GLUT', 'GLE', 'OpenGL', 'getGLUTFontPointer', 'GLUT_GUARD_CALLBACKS']
EXTENSIONS_USE_BASE_FUNCTIONS = False
GLUT_GUARD_CALLBACKS = False

 
class _CheckContext(object)
     Methods defined here:
__call__(self, *args, **named)
__getattr__(self, key)
__init__(self, func, ccisvalid)
__setattr__(self, key, value)

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

 
class _DeprecatedFunctionPointer(_NullFunctionPointer)
    
Method resolution order:
_DeprecatedFunctionPointer
_NullFunctionPointer
object

Methods defined here:
__call__(self, *args, **named)

Data and other attributes defined here:
deprecated = True

Methods inherited from _NullFunctionPointer:
__init__(self, name, dll, resultType, argTypes, argNames, extension=None, doc=None, deprecated=False)
__nonzero__(self)
Make this object appear to be NULL
load(self)
Attempt to load the function again, presumably with a context this time

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

Data and other attributes inherited from _NullFunctionPointer:
resolved = False

 
class _NullFunctionPointer(object)
    Function-pointer-like object for undefined functions
 
  Methods defined here:
__call__(self, *args, **named)
__init__(self, name, dll, resultType, argTypes, argNames, extension=None, doc=None, deprecated=False)
__nonzero__(self)
Make this object appear to be NULL
load(self)
Attempt to load the function again, presumably with a context this time

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

Data and other attributes defined here:
resolved = False

 
Data
        __file__ = '/home/mcfletch/pylive/OpenGL/platform/baseplatform.pyc'
__name__ = 'OpenGL.platform.baseplatform'
__package__ = 'OpenGL.platform'