OpenGL_accelerate.formathandler
Cython-coded base FormatHandler implementation
Classes
class FormatHandler(
object
):
PyOpenGL "Format" plugin implementation
PyOpenGL 3.x allows for multiple Formats for data arrays,
a FormatHandler provides generic API entry points which
allow PyOpenGL to manipulate/interact with data arrays
in the given format.
This is the C-level accelerator module which allows
for much faster access to the accelerator by the C-level
wrapper classes. This FormatHandler type should only
be used as a base class by those FormatHandlers which
provide C-level API entry points, you should *not*
sub-class it in Python.
__init__
Initialize the format handler
arrayByteCount
Given a data-value, calculate number of bytes required to represent
arraySize
Retrieve array size reference
arrayToGLType
Given a value, guess OpenGL type of the corresponding pointer
asArray
Retrieve the given value as a (contiguous) array of type typeCode
dataPointer
Retrieve data-pointer directly
dimensions
Retrieve full set of dimensions for the array as tuple
ERROR_ON_COPY
from_param
simple function-based from_param
register
Register this class as handler for given set of types
registerEquivalent
Register a sub-class for handling as the base-type
registerReturn
Register this handler as the default return-type handler
unitSize
Retrieve last dimension of the array
zeros
Create an array initialized to zeros