def _get_function_from_pyopengl(funcname):
 func = None
 try:
  func = getattr(_GL, funcname)
 except AttributeError:
  try:
   func = getattr(_FBO, funcname)
  except AttributeError:
   func = None
 if (not bool(func)):
  if funcname.endswith('f'):
   try:
    func = getattr(_GL, funcname[:(-1)])
   except AttributeError:
    pass
 if (func is None):
  func = _make_unavailable_func(funcname)
  logger.warning(('warning: %s not available' % funcname))
 return func

def _get_function_from_pyopengl ( funcname ) : func = None try : func = getattr ( _GL , funcname ) except AttributeError : try : func = getattr ( _FBO , funcname ) except AttributeError : func = None if ( not bool ( func ) ) : if funcname . endswith ( 'f' ) : try : func = getattr ( _GL , funcname [ : ( - 1 ) ] ) except AttributeError : pass if ( func is None ) : func = _make_unavailable_func ( funcname ) logger . warning ( ( 'warning: %s not available' % funcname ) ) return func
try getting the given function from pyopengl .