code: def test_use_desktop():
      """Testing that gl.use injects all names in gl namespace"""
      # Use desktop
      gl.use_gl("gl2")
      #
      for name in dir(gl.gl2):
          if name.lower().startswith("gl"):
              val1 = getattr(gl, name)
              val2 = getattr(gl.gl2, name)
              assert_is(val1, val2)
  
      # Use pyopengl
      gl.use_gl("pyopengl2")
      #
      for name in dir(gl.gl2):
          if name.lower().startswith("gl"):
              val1 = getattr(gl, name)
              val2 = getattr(gl.pyopengl2, name)
              assert_is(val1, val2)
  
      # Use gl+
      gl.use_gl("gl+")
      # uses all ES2 names from gl2 backend
      for name in dir(gl.gl2):
          if name.lower().startswith("gl"):
              val1 = getattr(gl, name)
              val2 = getattr(gl.pyopengl2, name)
              assert_is(val1, val2)
      # But provides extra names too
      for name in dir(gl.glplus):
          if name.lower().startswith("gl"):
              val1 = getattr(gl, name)
              val2 = getattr(gl.glplus, name)
              assert_is(val1, val2)
  
      # Use dummy
      gl.use_gl("dummy")
      #
      for name in dir(gl.gl2):
          if name.lower().startswith("gl"):
              val1 = getattr(gl, name)
              val2 = getattr(gl.dummy, name)
              assert_is(val1, val2)
  
      # Touch debug wrapper stuff
      gl.use_gl("gl2 debug")
  
      # Use desktop again
      gl.use_gl("gl2")
      #
      for name in dir(gl.gl2):
          if name.lower().startswith("gl"):
              val1 = getattr(gl, name)
              val2 = getattr(gl.gl2, name)
              assert_is(val1, val2)
  
imports: from vispy.testing import assert_is, requires_pyopengl
  from vispy.gloo import gl
  from vispy.testing import run_tests_if_main
label_desc: Use image node_id 2 for calling a global function with example usage: test_use_desktop() without return types