class_docstr: Base class for all objects that may be included in a GLSL program
  (Functions, Variables, Expressions).
  
  Shader objects have a *definition* that defines the object in GLSL, an
  *expression* that is used to reference the object, and a set of
  *dependencies* that must be declared before the object is used.
  
  Dependencies are tracked hierarchically such that changes to any object
  will be propagated up the dependency hierarchy to trigger a recompile.
class_docstr_tok: ["Base","class","for","all","objects","that","may","be","included","in","a","GLSL","program","(","Functions",",","Variables",",","Expressions",")",".","Shader","objects","have","a","*","definition","*","that","defines","the","object","in","GLSL",",","an","*","expression","*","that","is","used","to","reference","the","object",",","and","a","set","of","*","dependencies","*","that","must","be","declared","before","the","object","is","used",".","Dependencies","are","tracked","hierarchically","such","that","changes","to","any","object","will","be","propagated","up","the","dependency","hierarchy","to","trigger","a","recompile","."]
docstr: Return all dependencies required to use this object. The last item
  in the list is *self*.
docstr_tok: ["Return","all","dependencies","required","to","use","this","object",".","The","last","item","in","the","list","is","*","self","*","."]
code: def dependencies(self, sort=False):
      """Return all dependencies required to use this object. The last item
      in the list is *self*.
      """
      alldeps = []
      if sort:
  
          def key(obj):
              # sort deps such that we get functions, variables, self.
              if not isinstance(obj, Variable):
                  return (0, 0)
              else:
                  return (1, obj.vtype)
  
          deps = sorted(self._deps, key=key)
      else:
          deps = self._deps
  
      for dep in deps:
          alldeps.extend(dep.dependencies(sort=sort))
      alldeps.append(self)
      return alldeps
  
imports: from collections import OrderedDict
  from weakref import WeakKeyDictionary
  from .compiler import Compiler
  from .variable import Variable
  from .expression import TextExpression
label_desc: Use image node_id 7 for calling the ShaderObject obj's underlying member method code with example usage: obj.dependencies(sort) and returns: alldeps, int,  int, int,  obj