OpenGL.arrays.arrayhelpers
index
/build/buildd/pyopengl-3.0.0~b3/OpenGL/arrays/arrayhelpers.py

Helper functions for wrapping array-using operations
 
These are functions intended to be used in wrapping
GL functions that deal with OpenGL array data-types.

 
Modules
       
OpenGL.arrays.arraydatatype
OpenGL.constants
OpenGL.contextdata
OpenGL.converters
OpenGL.error
OpenGL.wrapper

 
Classes
       
CConverter(Converter)
AsArrayTypedSize
PyConverter(Converter)
AsArrayOfType
AsArrayTyped
object
storePointerType

 
class AsArrayOfType(PyConverter)
    Given arrayName and typeName coerce arrayName to array of type typeName
 
 
Method resolution order:
AsArrayOfType
PyConverter
Converter
object

Methods defined here:
__call__(self, arg, wrappedOperation, args)
Get the arg as an array of the appropriate type
__init__(self, arrayName='pointer', typeName='type')

Data and other attributes defined here:
argNames = ('arrayName', 'typeName')
indexLookups = (('arrayIndex', 'arrayName', 'pyArgIndex'), ('typeIndex', 'typeName', 'pyArgIndex'))

Methods inherited from Converter:
finalise(self, wrapper)
Look up our indices (where appropriate)

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

 
class AsArrayTyped(PyConverter)
    Given arrayName and arrayType, convert arrayName to array of type
 
 
Method resolution order:
AsArrayTyped
PyConverter
Converter
object

Methods defined here:
__call__(self, arg, wrappedOperation, args)
Get the arg as an array of the appropriate type
__init__(self, arrayName='pointer', arrayType=None)

Data and other attributes defined here:
argNames = ('arrayName', 'arrayType')
indexLookups = (('arrayIndex', 'arrayName', 'pyArgIndex'),)

Methods inherited from Converter:
finalise(self, wrapper)
Look up our indices (where appropriate)

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

 
class AsArrayTypedSize(CConverter)
    Given arrayName and arrayType, determine size of arrayName
 
 
Method resolution order:
AsArrayTypedSize
CConverter
Converter
object

Methods defined here:
__call__(self, pyArgs, index, wrappedOperation)
Get the arg as an array of the appropriate type
__init__(self, arrayName='pointer', arrayType=None)

Data and other attributes defined here:
argNames = ('arrayName', 'arrayType')
indexLookups = (('arrayIndex', 'arrayName', 'pyArgIndex'),)

Methods inherited from Converter:
finalise(self, wrapper)
Look up our indices (where appropriate)

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

 
class storePointerType(object)
    Store named pointer value in context indexed by constant
 
pointerName -- named pointer argument 
constant -- constant used to index in the context storage
 
Stores the pyArgs (i.e. result of pyConverters) for the named
pointer argument...
 
  Methods defined here:
__call__(self, result, baseOperation, pyArgs, cArgs)
__init__(self, pointerName, constant)
finalise(self, wrapper)

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

 
Functions
       
arraySizeOfFirstType(typ, default)
asArrayType(typ)
Create PyConverter to get first argument as array of type
asArrayTypeSize(typ, size)
Create PyConverter function to get array as type and check size
 
Produces a raw function, not a PyConverter instance
asVoidArray()
Create PyConverter returning incoming as an array of any type
returnPointer(result, baseOperation, pyArgs, cArgs)
Return the converted object as result of function
 
Note: this is a hack that always returns pyArgs[0]!
setInputArraySizeType(baseOperation, size, type, argName=0)
Decorate function with vector-handling code for a single argument
 
This assumes *no* argument expansion, i.e. a 1:1 correspondence...
typedPointer(typ, ctyp)
Create a CResolver to get argument as a pointer to the ctypes type ctyp
 
i.e. typedPointer( arrays.UIntArray, ctypes.c_uint )

 
Data
        __file__ = '/build/buildd/pyopengl-3.0.0~b3/OpenGL/arrays/arrayhelpers.py'
__name__ = 'OpenGL.arrays.arrayhelpers'