code: def _gl_enable_lighting(scene):
          
          gl.glEnable(gl.GL_LIGHTING)
          # opengl only supports 7 lights?
          for i, light in enumerate(scene.lights[:7]):
              # the index of which light we have
              lightN = eval('gl.GL_LIGHT{}'.format(i))
  
              # get the transform for the light by name
              matrix = scene.graph[light.name][0]
  
              # convert light object to glLightfv calls
              multiargs = rendering.light_to_gl(
                  light=light,
                  transform=matrix,
                  lightN=lightN)
  
              # enable the light in question
              gl.glEnable(lightN)
              # run the glLightfv calls
              for args in multiargs:
                  gl.glLightfv(*args)
docs: Take the lights defined in scene.lights and
          apply them as openGL lights.