# Path: glitter/utils/dtypes.py
# class Datatype(object):
#     def __init__(self, integer, signed, nptype, _gltype=None, charcode=None):
#     def from_numpy(cls, nptype):
#     def _from_gl(cls, _gltype):
#     def as_numpy(self):
#     def _as_gl(self):
#     def as_signed(self):
#     def as_unsigned(self):
#     def as_nbytes(self, nbytes):
#     def is_signed(self):
#     def is_unsigned(self):
#     def is_integer(self):
#     def is_float(self):
#     def is_boolean(self):
#     def charcode(self):
#     def nbytes(self):
#     def __str__(self):
#     def __repr__(self):
#     def coerced(self, force_integer=False, force_unsigned=False, force_float=False, force_gl=True):
# def coerce_array(data, dtype=None, force_integer=False, force_unsigned=False, force_float=False, force_gl=True):
# 
# Path: glitter/utils/enum.py
# class Enum(object):
#     def __init__(self, **kwargs):
#         self._reverse_dict = {}
#         for key, value in list(kwargs.items()):
#             self._add(key, value)
# 
#     def __getitem__(self, value):
#         return self._reverse_dict[value]
# 
#     def __call__(self, obj):
#         """Convert C{obj} into an appropriate L{EnumConstant}.
#         """
# 
#         if obj in list(self.__dict__.values()): # A matching EnumConstant is okay.
#             return obj
#         elif obj in list(self.__dict__.keys()): # A string is converted to an EnumConstant if possible.
#             return self.__dict__[obj]
#         else: # Anything else is just wrong.
#             raise TypeError("%r is not a valid enum constant here" % obj)
# 
#     def _add(self, key, value):
#         setattr(self, key, EnumConstant(self, key, value))
#         self._reverse_dict[value] = getattr(self, key)
# 
#     def __repr__(self):
#         return "Enum(%s)" % ", ".join(map(str, list(self._reverse_dict.values())))


import glitter.raw as _gl
from glitter.utils.dtypes import uint8, uint16, uint32, int8, int16, int32, float32
from glitter.utils.enum import Enum
        ((int16, 1), _gl.GL_DEPTH_COMPONENT16, (_gl.GL_SHORT, _gl.GL_DEPTH_COMPONENT)),
        ((int32, 1), _gl.GL_DEPTH_COMPONENT24, (_gl.GL_INT, _gl.GL_DEPTH_COMPONENT)),
        ((int32, 1), _gl.GL_DEPTH_COMPONENT32, (_gl.GL_INT, _gl.GL_DEPTH_COMPONENT)),

        ((uint8,   1), _gl.GL_R8UI,     (_gl.GL_UNSIGNED_BYTE,  _gl.GL_RED_INTEGER )),
        ((int8,    1), _gl.GL_R8I,      (_gl.GL_BYTE,           _gl.GL_RED_INTEGER )),
        ((uint16,  1), _gl.GL_R16UI,    (_gl.GL_UNSIGNED_SHORT, _gl.GL_RED_INTEGER )),
        ((int16,   1), _gl.GL_R16I,     (_gl.GL_SHORT,          _gl.GL_RED_INTEGER )),
        ((uint32,  1), _gl.GL_R32UI,    (_gl.GL_UNSIGNED_INT,   _gl.GL_RED_INTEGER )),
        ((int32,   1), _gl.GL_R32I,     (_gl.GL_INT,            _gl.GL_RED_INTEGER )),
        ((float32, 1), _gl.GL_R32F,     (_gl.GL_FLOAT,          _gl.GL_RED         )),
        ((uint8,   2), _gl.GL_RG8UI,    (_gl.GL_UNSIGNED_BYTE,  _gl.GL_RG_INTEGER  )),
        ((int8,    2), _gl.GL_RG8I,     (_gl.GL_BYTE,           _gl.GL_RG_INTEGER  )),
        ((uint16,  2), _gl.GL_RG16UI,   (_gl.GL_UNSIGNED_SHORT, _gl.GL_RG_INTEGER  )),
        ((int16,   2), _gl.GL_RG16I,    (_gl.GL_SHORT,          _gl.GL_RG_INTEGER  )),
        ((uint32,  2), _gl.GL_RG32UI,   (_gl.GL_UNSIGNED_INT,   _gl.GL_RG_INTEGER  )),
        ((int32,   2), _gl.GL_RG32I,    (_gl.GL_INT,            _gl.GL_RG_INTEGER  )),
        ((float32, 2), _gl.GL_RG32F,    (_gl.GL_FLOAT,          _gl.GL_RG          )),
        ((uint8,   3), _gl.GL_RGB8UI,   (_gl.GL_UNSIGNED_BYTE,  _gl.GL_RGB_INTEGER )),
        ((int8,    3), _gl.GL_RGB8I,    (_gl.GL_BYTE,           _gl.GL_RGB_INTEGER )),
        ((uint16,  3), _gl.GL_RGB16UI,  (_gl.GL_UNSIGNED_SHORT, _gl.GL_RGB_INTEGER )),
        ((int16,   3), _gl.GL_RGB16I,   (_gl.GL_SHORT,          _gl.GL_RGB_INTEGER )),
        ((uint32,  3), _gl.GL_RGB32UI,  (_gl.GL_UNSIGNED_INT,   _gl.GL_RGB_INTEGER )),
        ((int32,   3), _gl.GL_RGB32I,   (_gl.GL_INT,            _gl.GL_RGB_INTEGER )),
        ((float32, 3), _gl.GL_RGB32F,   (_gl.GL_FLOAT,          _gl.GL_RGB         )),
        ((uint8,   4), _gl.GL_RGBA8UI,  (_gl.GL_UNSIGNED_BYTE,  _gl.GL_RGBA_INTEGER)),
        ((int8,    4), _gl.GL_RGBA8I,   (_gl.GL_BYTE,           _gl.GL_RGBA_INTEGER)),
        ((uint16,  4), _gl.GL_RGBA16UI, (_gl.GL_UNSIGNED_SHORT, _gl.GL_RGBA_INTEGER)),
        ((int16,   4), _gl.GL_RGBA16I,  (_gl.GL_SHORT,          _gl.GL_RGBA_INTEGER)),
        ((uint32,  4), _gl.GL_RGBA32UI, (_gl.GL_UNSIGNED_INT,   _gl.GL_RGBA_INTEGER)),

# Path: glitter/utils/dtypes.py
# class Datatype(object):
#     def __init__(self, integer, signed, nptype, _gltype=None, charcode=None):
#     def from_numpy(cls, nptype):
#     def _from_gl(cls, _gltype):
#     def as_numpy(self):
#     def _as_gl(self):
#     def as_signed(self):
#     def as_unsigned(self):
#     def as_nbytes(self, nbytes):
#     def is_signed(self):
#     def is_unsigned(self):
#     def is_integer(self):
#     def is_float(self):
#     def is_boolean(self):
#     def charcode(self):
#     def nbytes(self):
#     def __str__(self):
#     def __repr__(self):
#     def coerced(self, force_integer=False, force_unsigned=False, force_float=False, force_gl=True):
# def coerce_array(data, dtype=None, force_integer=False, force_unsigned=False, force_float=False, force_gl=True):
# 
# Path: glitter/utils/enum.py
# class Enum(object):
#     def __init__(self, **kwargs):
#         self._reverse_dict = {}
#         for key, value in list(kwargs.items()):
#             self._add(key, value)
# 
#     def __getitem__(self, value):
#         return self._reverse_dict[value]
# 
#     def __call__(self, obj):
#         """Convert C{obj} into an appropriate L{EnumConstant}.
#         """
# 
#         if obj in list(self.__dict__.values()): # A matching EnumConstant is okay.
#             return obj
#         elif obj in list(self.__dict__.keys()): # A string is converted to an EnumConstant if possible.
#             return self.__dict__[obj]
#         else: # Anything else is just wrong.
#             raise TypeError("%r is not a valid enum constant here" % obj)
# 
#     def _add(self, key, value):
#         setattr(self, key, EnumConstant(self, key, value))
#         self._reverse_dict[value] = getattr(self, key)
# 
#     def __repr__(self):
#         return "Enum(%s)" % ", ".join(map(str, list(self._reverse_dict.values())))


# Path: glitter/utils/constants.py
import glitter.raw as _gl
from glitter.utils.dtypes import uint8, uint16, uint32, int8, int16, int32, float32
from glitter.utils.enum import Enum

        ((int16, 1), _gl.GL_DEPTH_COMPONENT16, (_gl.GL_SHORT, _gl.GL_DEPTH_COMPONENT)),
        ((int32, 1), _gl.GL_DEPTH_COMPONENT24, (_gl.GL_INT, _gl.GL_DEPTH_COMPONENT)),
        ((int32, 1), _gl.GL_DEPTH_COMPONENT32, (_gl.GL_INT, _gl.GL_DEPTH_COMPONENT)),

        ((uint8,   1), _gl.GL_R8UI,     (_gl.GL_UNSIGNED_BYTE,  _gl.GL_RED_INTEGER )),
        ((int8,    1), _gl.GL_R8I,      (_gl.GL_BYTE,           _gl.GL_RED_INTEGER )),
        ((uint16,  1), _gl.GL_R16UI,    (_gl.GL_UNSIGNED_SHORT, _gl.GL_RED_INTEGER )),
        ((int16,   1), _gl.GL_R16I,     (_gl.GL_SHORT,          _gl.GL_RED_INTEGER )),
        ((uint32,  1), _gl.GL_R32UI,    (_gl.GL_UNSIGNED_INT,   _gl.GL_RED_INTEGER )),
        ((int32,   1), _gl.GL_R32I,     (_gl.GL_INT,            _gl.GL_RED_INTEGER )),
        ((float32, 1), _gl.GL_R32F,     (_gl.GL_FLOAT,          _gl.GL_RED         )),
        ((uint8,   2), _gl.GL_RG8UI,    (_gl.GL_UNSIGNED_BYTE,  _gl.GL_RG_INTEGER  )),
        ((int8,    2), _gl.GL_RG8I,     (_gl.GL_BYTE,           _gl.GL_RG_INTEGER  )),
        ((uint16,  2), _gl.GL_RG16UI,   (_gl.GL_UNSIGNED_SHORT, _gl.GL_RG_INTEGER  )),
        ((int16,   2), _gl.GL_RG16I,    (_gl.GL_SHORT,          _gl.GL_RG_INTEGER  )),
        ((uint32,  2), _gl.GL_RG32UI,   (_gl.GL_UNSIGNED_INT,   _gl.GL_RG_INTEGER  )),
        ((int32,   2), _gl.GL_RG32I,    (_gl.GL_INT,            _gl.GL_RG_INTEGER  )),
        ((float32, 2), _gl.GL_RG32F,    (_gl.GL_FLOAT,          _gl.GL_RG          )),
        ((uint8,   3), _gl.GL_RGB8UI,   (_gl.GL_UNSIGNED_BYTE,  _gl.GL_RGB_INTEGER )),
        ((int8,    3), _gl.GL_RGB8I,    (_gl.GL_BYTE,           _gl.GL_RGB_INTEGER )),
        ((uint16,  3), _gl.GL_RGB16UI,  (_gl.GL_UNSIGNED_SHORT, _gl.GL_RGB_INTEGER )),
        ((int16,   3), _gl.GL_RGB16I,   (_gl.GL_SHORT,          _gl.GL_RGB_INTEGER )),
        ((uint32,  3), _gl.GL_RGB32UI,  (_gl.GL_UNSIGNED_INT,   _gl.GL_RGB_INTEGER )),
        ((int32,   3), _gl.GL_RGB32I,   (_gl.GL_INT,            _gl.GL_RGB_INTEGER )),
        ((float32, 3), _gl.GL_RGB32F,   (_gl.GL_FLOAT,          _gl.GL_RGB         )),
        ((uint8,   4), _gl.GL_RGBA8UI,  (_gl.GL_UNSIGNED_BYTE,  _gl.GL_RGBA_INTEGER)),
        ((int8,    4), _gl.GL_RGBA8I,   (_gl.GL_BYTE,           _gl.GL_RGBA_INTEGER)),
        ((uint16,  4), _gl.GL_RGBA16UI, (_gl.GL_UNSIGNED_SHORT, _gl.GL_RGBA_INTEGER)),
        ((int16,   4), _gl.GL_RGBA16I,  (_gl.GL_SHORT,          _gl.GL_RGBA_INTEGER)),
        ((uint32,  4), _gl.GL_RGBA32UI, (_gl.GL_UNSIGNED_INT,   _gl.GL_RGBA_INTEGER)),

        ((int32,   4), _gl.GL_RGBA32I,  (_gl.GL_INT,            _gl.GL_RGBA_INTEGER)),