code: def _copy_gl_functions(source, dest, constants=False, debug=False):
      """Inject all objects that start with 'gl' from the source
      into the dest. source and dest can be dicts, modules or BaseGLProxy's.
      """
      # Get dicts
      if isinstance(source, BaseGLProxy):
          s = {}
          for key in dir(source):
              s[key] = getattr(source, key)
          source = s
      elif not isinstance(source, dict):
          source = source.__dict__
      if not isinstance(dest, dict):
          dest = dest.__dict__
      # Copy names
      funcnames = [
          name for name in source.keys() if name.startswith("gl")
      ]
      for name in funcnames:
          if debug and name != "glGetError":
              dest[name] = make_debug_wrapper(source[name])
          else:
              dest[name] = source[name]
      # Copy constants
      if constants:
          constnames = [
              name for name in source.keys() if name.startswith("GL_")
          ]
          for name in constnames:
              dest[name] = source[name]
  
file_path: vispy/vispy/gloo/gl/__init__.py
imports: from __future__ import division
  import os
  from ...util import config, logger
  from ._constants import *
  from ._proxy import BaseGLProxy
  from .None import gl2
label_desc: Use image node_id 3 for calling a global function with example usage: _copy_gl_functions(source, dest, constants, debug) without return types