OpenGL.platform.baseplatform
index
/build/buildd/pyopengl-3.0.0~b6/OpenGL/platform/baseplatform.py

Base class for platform implementations

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

 
Classes
       
object
BasePlatform
_NullFunctionPointer

 
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_long'>, argTypes=(), doc=None, argNames=(), extension=None)
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_long'>, argTypes=(), doc=None, argNames=(), extension=None)
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_long'>, argTypes=(), doc=None, argNames=(), extension=None)
errorChecking(self, func)
Add error checking to the function if appropriate
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_long'>, argTypes=(), doc=None, argNames=(), extension=None)
Construct a "null" function pointer
safeGetError(self)
Safety-checked version of glError() call (checks for valid context first)
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 _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)
__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__ = '/build/buildd/pyopengl-3.0.0~b6/OpenGL/platform/baseplatform.py'
__name__ = 'OpenGL.platform.baseplatform'