# 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
        UNSIGNED_INT_8_8_8_8=_gl.GL_UNSIGNED_INT_8_8_8_8,
        UNSIGNED_INT_8_8_8_8_REV=_gl.GL_UNSIGNED_INT_8_8_8_8_REV,
        UNSIGNED_INT_10_10_10_2=_gl.GL_UNSIGNED_INT_10_10_10_2,
        UNSIGNED_INT_2_10_10_10_REV=_gl.GL_UNSIGNED_INT_2_10_10_10_REV,
        UNSIGNED_INT_24_8=_gl.GL_UNSIGNED_INT_24_8,
        UNSIGNED_INT_10F_11F_11F_REV=_gl.GL_UNSIGNED_INT_10F_11F_11F_REV,
        UNSIGNED_INT_5_9_9_9_REV=_gl.GL_UNSIGNED_INT_5_9_9_9_REV,
        FLOAT_32_UNSIGNED_INT_24_8_REV=_gl.GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
)

read_buffers = Enum(
        NONE=_gl.GL_NONE,
        FRONT_LEFT=_gl.GL_FRONT_LEFT,
        FRONT_RIGHT=_gl.GL_FRONT_RIGHT,
        BACK_LEFT=_gl.GL_BACK_LEFT,
        BACK_RIGHT=_gl.GL_BACK_RIGHT,
        FRONT=_gl.GL_FRONT,
        BACK=_gl.GL_BACK,
        LEFT=_gl.GL_LEFT,
        RIGHT=_gl.GL_RIGHT,
)
for key, value in list(_gl.__dict__.items()):
    if key.startswith("GL_COLOR_ATTACHMENT"):
        read_buffers._add(key[3:], value)

transform_feedback_buffer_modes = Enum(
        SEPARATE_ATTRIBS=_gl.GL_SEPARATE_ATTRIBS,
        INTERLEAVED_ATTRIBS=_gl.GL_INTERLEAVED_ATTRIBS,
)


# 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

        UNSIGNED_INT_8_8_8_8=_gl.GL_UNSIGNED_INT_8_8_8_8,
        UNSIGNED_INT_8_8_8_8_REV=_gl.GL_UNSIGNED_INT_8_8_8_8_REV,
        UNSIGNED_INT_10_10_10_2=_gl.GL_UNSIGNED_INT_10_10_10_2,
        UNSIGNED_INT_2_10_10_10_REV=_gl.GL_UNSIGNED_INT_2_10_10_10_REV,
        UNSIGNED_INT_24_8=_gl.GL_UNSIGNED_INT_24_8,
        UNSIGNED_INT_10F_11F_11F_REV=_gl.GL_UNSIGNED_INT_10F_11F_11F_REV,
        UNSIGNED_INT_5_9_9_9_REV=_gl.GL_UNSIGNED_INT_5_9_9_9_REV,
        FLOAT_32_UNSIGNED_INT_24_8_REV=_gl.GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
)

read_buffers = Enum(
        NONE=_gl.GL_NONE,
        FRONT_LEFT=_gl.GL_FRONT_LEFT,
        FRONT_RIGHT=_gl.GL_FRONT_RIGHT,
        BACK_LEFT=_gl.GL_BACK_LEFT,
        BACK_RIGHT=_gl.GL_BACK_RIGHT,
        FRONT=_gl.GL_FRONT,
        BACK=_gl.GL_BACK,
        LEFT=_gl.GL_LEFT,
        RIGHT=_gl.GL_RIGHT,
)
for key, value in list(_gl.__dict__.items()):
    if key.startswith("GL_COLOR_ATTACHMENT"):
        read_buffers._add(key[3:], value)

transform_feedback_buffer_modes = Enum(
        SEPARATE_ATTRIBS=_gl.GL_SEPARATE_ATTRIBS,
        INTERLEAVED_ATTRIBS=_gl.GL_INTERLEAVED_ATTRIBS,
)


client_wait_sync_returns = Enum(