| OpenGL.arrays.numpymodule | index /home/mcfletch/pylive/OpenGL/arrays/numpymodule.py |
Numpy (new version) module implementation of the OpenGL-ctypes array interfaces
XXX Need to register handlers for all of the scalar types that numpy returns,
would like to have all return values be int/float if they are of compatible
type as well.
| Modules | ||||||
| ||||||
| Functions | ||
| ||
| Data | ||
| ARRAY_TO_GL_TYPE_MAPPING = {dtype('int8'): GL_BYTE, dtype('uint8'): GL_UNSIGNED_BYTE, dtype('uint16'): GL_UNSIGNED_SHORT, dtype('int16'): GL_SHORT, dtype('float32'): GL_FLOAT, dtype('int32'): GL_INT, dtype('uint32'): GL_UNSIGNED_INT, None: None, dtype('float64'): GL_DOUBLE, dtype('|S1'): GL_UNSIGNED_BYTE} GL_TYPE_TO_ARRAY_MAPPING = {None: None, GL_BYTE: dtype('int8'), GL_UNSIGNED_BYTE: dtype('uint8'), GL_SHORT: dtype('int16'), GL_UNSIGNED_SHORT: dtype('uint16'), GL_INT: dtype('int32'), GL_UNSIGNED_INT: dtype('uint32'), GL_FLOAT: dtype('float32'), GL_DOUBLE: dtype('float64')} REGISTRY_NAME = 'numpy' SHORT_TYPE = 'h' USHORT_TYPE = 'H' __file__ = '/home/mcfletch/pylive/OpenGL/arrays/numpymodule.pyc' __name__ = 'OpenGL.arrays.numpymodule' __package__ = 'OpenGL.arrays' err = TypeError('data type not understood',) log = <logging.Logger instance at 0x21d9320> | ||