OpenGL.platform.__init__
index
/var/pylive/OpenGL-ctypes/OpenGL/platform/__init__.py

Abstraction for the platform-specific code in PyOpenGL
 
Eventually there will likely be enough code here to warrant
having separate modules for each platform.  Then we may load
them using sys.platform to construct the module name in order
to allow for easy extensions for new platforms.
 
GLUT_GUARD_CALLBACKS -- if True, all GLUT callbacks are wrapped
        with code to check for errors and exit if there is a failure
        in the callback...

 
Modules
       
ctypes
sys

 
Classes
       
object
_NullFunctionPointer

 
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=True)
__nonzero__(self)
Make this object appear to be NULL
load(self)
Attempt to load the function again, presumably with a context this time

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of '_NullFunctionPointer' objects>
list of weak references to the object (if defined)
resolved = False

 
Functions
       
CurrentContextIsValid = glXGetCurrentContext(...)
GetCurrentContext = glXGetCurrentContext(...)
copyBaseFunction(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(functionName, dll=<CDLL 'libGL.so.1', handle 80cc0d8 at b7c16bcc>, resultType=<class 'ctypes.c_long'>, argTypes=(), doc=None, argNames=())
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(functionName, dll=<CDLL 'libGL.so.1', handle 80cc0d8 at b7c16bcc>, resultType=<class 'ctypes.c_long'>, argTypes=(), doc=None, argNames=())
Create an extension function for the given name
 
Uses the platform's getExtensionProcedure function to retrieve
a c_void_p to the function, then wraps in a platform FunctionType
instance with all the funky code we've come to love.
functionTypeFor(dll)
Given a DLL, determine appropriate function type...
init_extension(name)
Check whether the given extension exists
nullFunction(functionName, dll=<CDLL 'libGL.so.1', handle 80cc0d8 at b7c16bcc>, resultType=<class 'ctypes.c_long'>, argTypes=(), doc=None, argNames=(), extension=True)
Construct a "null" function pointer
safeGetError = glGetError(...)

 
Data
        EXTENSIONS_USE_BASE_FUNCTIONS = False
EXT_DEFINES_PROTO = True
GL = <CDLL 'libGL.so.1', handle 80cc0d8 at b7c16bcc>
GLE = <CDLL 'libgle.so.3', handle 80e8a68 at b7c2116c>
GLU = <CDLL 'libGLU.so.1', handle 80e74a8 at b7c2118c>
GLUT = <CDLL 'libglut.so.3', handle 80e7bf0 at b7c164ec>
GLUT_GUARD_CALLBACKS = False
GLX = <CDLL 'libGL.so.1', handle 80cc0d8 at b7c16bcc>
HAS_DYNAMIC_EXT = True
OpenGL = <CDLL 'libGL.so.1', handle 80cc0d8 at b7c16bcc>