# 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):


import numpy as _np
import glitter.raw as _gl
from glitter.utils.dtypes import Datatype, bool8, int32, uint32, float32, float64
    def is_integer(self):
        return self.dtype.is_integer()

    def is_float(self):
        return self.dtype.is_float()

    def is_boolean(self):
        return self.dtype.is_boolean()

    def is_texture(self):
        return self._texture

    def is_atomic(self):
        return self._atomic

    def __str__(self):
        return self._name

shader_float = ShaderDatatype("float", _gl.GL_FLOAT, dtype=float32)
shader_vec2 = ShaderDatatype("vec2", _gl.GL_FLOAT_VEC2, dtype=float32, shape=2)
shader_vec3 = ShaderDatatype("vec3", _gl.GL_FLOAT_VEC3, dtype=float32, shape=3)
shader_vec4 = ShaderDatatype("vec4", _gl.GL_FLOAT_VEC4, dtype=float32, shape=4)
shader_double = ShaderDatatype("double", _gl.GL_DOUBLE, dtype=float64)
shader_dvec2 = ShaderDatatype("dvec2", _gl.GL_DOUBLE_VEC2, dtype=float64, shape=2)
shader_dvec3 = ShaderDatatype("dvec3", _gl.GL_DOUBLE_VEC3, dtype=float64, shape=3)
shader_dvec4 = ShaderDatatype("dvec4", _gl.GL_DOUBLE_VEC4, dtype=float64, shape=4)
shader_int = ShaderDatatype("int", _gl.GL_INT, dtype=int32)
shader_ivec2 = ShaderDatatype("ivec2", _gl.GL_INT_VEC2, dtype=int32, shape=2)
shader_ivec3 = ShaderDatatype("ivec3", _gl.GL_INT_VEC3, dtype=int32, shape=3)
shader_ivec4 = ShaderDatatype("ivec4", _gl.GL_INT_VEC4, dtype=int32, shape=4)

# 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/shaderdtypes.py
import numpy as _np
import glitter.raw as _gl
from glitter.utils.dtypes import Datatype, bool8, int32, uint32, float32, float64

    def is_integer(self):
        return self.dtype.is_integer()

    def is_float(self):
        return self.dtype.is_float()

    def is_boolean(self):
        return self.dtype.is_boolean()

    def is_texture(self):
        return self._texture

    def is_atomic(self):
        return self._atomic

    def __str__(self):
        return self._name

shader_float = ShaderDatatype("float", _gl.GL_FLOAT, dtype=float32)
shader_vec2 = ShaderDatatype("vec2", _gl.GL_FLOAT_VEC2, dtype=float32, shape=2)
shader_vec3 = ShaderDatatype("vec3", _gl.GL_FLOAT_VEC3, dtype=float32, shape=3)
shader_vec4 = ShaderDatatype("vec4", _gl.GL_FLOAT_VEC4, dtype=float32, shape=4)
shader_double = ShaderDatatype("double", _gl.GL_DOUBLE, dtype=float64)
shader_dvec2 = ShaderDatatype("dvec2", _gl.GL_DOUBLE_VEC2, dtype=float64, shape=2)
shader_dvec3 = ShaderDatatype("dvec3", _gl.GL_DOUBLE_VEC3, dtype=float64, shape=3)
shader_dvec4 = ShaderDatatype("dvec4", _gl.GL_DOUBLE_VEC4, dtype=float64, shape=4)
shader_int = ShaderDatatype("int", _gl.GL_INT, dtype=int32)
shader_ivec2 = ShaderDatatype("ivec2", _gl.GL_INT_VEC2, dtype=int32, shape=2)
shader_ivec3 = ShaderDatatype("ivec3", _gl.GL_INT_VEC3, dtype=int32, shape=3)
shader_ivec4 = ShaderDatatype("ivec4", _gl.GL_INT_VEC4, dtype=int32, shape=4)

shader_unsigned_int = ShaderDatatype("unsigned int", _gl.GL_UNSIGNED_INT, dtype=uint32)