def use_gl(target='gl2'):
 target = (target or 'gl2')
 target = target.replace('+', 'plus')
 (target, _, options) = target.partition(' ')
 debug = (config['gl_debug'] or ('debug' in options))
 try:
  mod = __import__(target, globals(), level=1)
 except ImportError as err:
  msg = ('Could not import gl target "%s":\n%s' % (target, str(err)))
  raise RuntimeError(msg)
 global current_backend
 current_backend = mod
 _clear_namespace()
 if ('plus' in target):
  _copy_gl_functions(mod._pyopengl2, globals())
  _copy_gl_functions(mod, globals(), True)
 elif debug:
  _copy_gl_functions(_debug_proxy, globals())
 else:
  _copy_gl_functions(mod, globals())

def use_gl ( target = 'gl2' ) : target = ( target or 'gl2' ) target = target . replace ( '+' , 'plus' ) ( target , _ , options ) = target . partition ( ' ' ) debug = ( config [ 'gl_debug' ] or ( 'debug' in options ) ) try : mod = __import__ ( target , globals ( ) , level = 1 ) except ImportError as err : msg = ( 'Could not import gl target "%s":\n%s' % ( target , str ( err ) ) ) raise RuntimeError ( msg ) global current_backend current_backend = mod _clear_namespace ( ) if ( 'plus' in target ) : _copy_gl_functions ( mod . _pyopengl2 , globals ( ) ) _copy_gl_functions ( mod , globals ( ) , True ) elif debug : _copy_gl_functions ( _debug_proxy , globals ( ) ) else : _copy_gl_functions ( mod , globals ( ) )
let vispy use the target opengl es 2 .