# Path: e3d/backends/base_backend.py
# class ShaderStruct(OrderedDict):
#     def __init__(self, *args, **kwds):
#         super(ShaderStruct, self).__init__(*args, **kwds)
# 
#     def __len__(self):
#         res = super(ShaderStruct, self).__len__()
#         for it in self.values():
#             if isinstance(it, list):
#                 res += it.__len__() - 2
#         return res
# 
#     def append(self, key, pyob):
#         if key in self.keys():
#             self.pop(key)
#         self[key] = pyob
# 
#     def updateValue(self, key, value):
#         self[key] = value
# 
# Path: e3d/backends/ogl3/shader_management/ShaderParametersHelper.py
# def getActiveUniforms(program):
#     actives = getShaderActives(program, GL_ACTIVE_UNIFORMS, GL_ACTIVE_UNIFORM_MAX_LENGTH)
#     return actives
# 
# def getActiveAttribs(program):
#     actives = getShaderActives(program, GL_ACTIVE_ATTRIBUTES, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH)
#     return actives


import numpy as np
from glaze.GL import *
from ...base_backend import ShaderStruct
from .ShaderParametersHelper import getActiveUniforms, getActiveAttribs
        from glaze import GL
        @type GLSL_program: int
        """
        self._maxBones = 50
        self._maxTextureUnits = shadersManager._maxTextureUnits
        self._program = GLSL_program
        self._iID = ID
        self._attributesHandlesCache = {}
        self._uniformsHandlesCache = {}
        self._textureLastValues = {}
        self._textureUnitsUsed = -1
        self._lastActiveUnit = -1
        self._isSet = False
        self._sman = shadersManager
        self._unitsCache = []
        self._reportInactive = False
        self._fill_unitsCache()
        self._uniformLastValueV = {}
        self._uniformLastValueF = {}
        self._uniformLastValueI = {}

        uniforms = getActiveUniforms(GLSL_program)
        for ulocation, utype, uname in uniforms:
            self._uniformsHandlesCache[uname] = ulocation

        attribs = getActiveAttribs(GLSL_program)
        for alocation, atype, aname in attribs:
            self._attributesHandlesCache[aname] = alocation

        self._activeUniforms = uniforms


# Path: e3d/backends/base_backend.py
# class ShaderStruct(OrderedDict):
#     def __init__(self, *args, **kwds):
#         super(ShaderStruct, self).__init__(*args, **kwds)
# 
#     def __len__(self):
#         res = super(ShaderStruct, self).__len__()
#         for it in self.values():
#             if isinstance(it, list):
#                 res += it.__len__() - 2
#         return res
# 
#     def append(self, key, pyob):
#         if key in self.keys():
#             self.pop(key)
#         self[key] = pyob
# 
#     def updateValue(self, key, value):
#         self[key] = value
# 
# Path: e3d/backends/ogl3/shader_management/ShaderParametersHelper.py
# def getActiveUniforms(program):
#     actives = getShaderActives(program, GL_ACTIVE_UNIFORMS, GL_ACTIVE_UNIFORM_MAX_LENGTH)
#     return actives
# 
# def getActiveAttribs(program):
#     actives = getShaderActives(program, GL_ACTIVE_ATTRIBUTES, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH)
#     return actives


# Path: e3d/backends/ogl3/shader_management/ShaderClass.py
import numpy as np
from glaze.GL import *
from ...base_backend import ShaderStruct
from .ShaderParametersHelper import getActiveUniforms, getActiveAttribs
        from glaze import GL

        @type GLSL_program: int
        """
        self._maxBones = 50
        self._maxTextureUnits = shadersManager._maxTextureUnits
        self._program = GLSL_program
        self._iID = ID
        self._attributesHandlesCache = {}
        self._uniformsHandlesCache = {}
        self._textureLastValues = {}
        self._textureUnitsUsed = -1
        self._lastActiveUnit = -1
        self._isSet = False
        self._sman = shadersManager
        self._unitsCache = []
        self._reportInactive = False
        self._fill_unitsCache()
        self._uniformLastValueV = {}
        self._uniformLastValueF = {}
        self._uniformLastValueI = {}

        uniforms = getActiveUniforms(GLSL_program)
        for ulocation, utype, uname in uniforms:
            self._uniformsHandlesCache[uname] = ulocation

        attribs = getActiveAttribs(GLSL_program)
        for alocation, atype, aname in attribs:
            self._attributesHandlesCache[aname] = alocation

        self._activeUniforms = uniforms


    def getActiveUniforms(self):