def failFunction( *args, **named ): from OpenGL import error raise error.NullFunctionError( """Undefined GLUT callback function %s, check for bool(%s) before calling"""%( typeName, 'glut%sFunc'%(typeName), ) )
def __call__( self, *args, **named ): from OpenGL import error raise error.NullFunctionError( """Attempt to call a deprecated function %s while OpenGL in FORWARD_COMPATIBLE_ONLY mode. Set OpenGL.FORWARD_COMPATIBLE_ONLY to False to use legacy entry points"""%( self.__name__, ) )
def __call__( self, *args, **named ): if self.load(): return self( *args, **named ) else: from OpenGL import error raise error.NullFunctionError( """Attempt to call an undefined function %s, check for bool(%s) before calling"""%( self.__name__, self.__name__, ) )
def __call__( self, *args, **named ): """Call, doing a late lookup and bind to find an implementation""" for alternate in self._alternatives: if alternate: self.__class__.__call__ = alternate.__call__ return self( *args, **named ) from OpenGL import error raise error.NullFunctionError( """Attempt to call an undefined alterate function (%s), check for bool(%s) before calling"""%( ', '.join([x.__name__ for x in self._alternatives]), self.__name__, ) )
def __call__(self, *args, **named): if self.load(): return self(*args, **named) else: try: from OpenGL import error except ImportError: # Python interpreter is shutting down... pass # ^ it is? is it? else: raise error.NullFunctionError( f"Attempt to call an undefined function {self.__name__}, " f"check for bool({self.__name__}) before calling")
def finalise(self): """Call, doing a late lookup and bind to find an implementation""" for alternate in self._alternatives: if alternate: log.info("""Chose alternate: %s from %s""", alternate.__name__, ", ".join([x.__name__ for x in self._alternatives])) return alternate from OpenGL import error raise error.NullFunctionError( """Attempt to call an undefined alternate function (%s), check for bool(%s) before calling""" % ( ', '.join([x.__name__ for x in self._alternatives]), self.__name__, ))
def __call__(self, *args, **named): if self.load(): return self(*args, **named) else: try: from OpenGL import error except ImportError as err: # Python interpreter is shutting down... pass else: raise error.NullFunctionError( """Attempt to call an undefined function %s, check for bool(%s) before calling""" % ( self.__name__, self.__name__, ))
def __call__(self, *args, **named): from OpenGL import error raise error.NullFunctionError( f"Attempt to call a deprecated function {self.name} while OpenGL in " "FORWARD_COMPATIBLE_ONLY mode. Set OpenGL.FORWARD_COMPATIBLE_ONLY to False " "to use legacy entry points")