OpenGL.error | index /var/pylive/src/OpenGL-dev/OpenGL-ctypes/OpenGL/error.py

`Implementation of OpenGL errors/exceptions
Note that OpenGL-ctypes will also throw standard errors,
such as TypeError or ValueError when appropriate.
ErrorChecker is an _ErrorChecker instance that allows you
to register a new error-checking function for use
throughout the system.`

Modules
`` |  |
OpenGL.platform |  |  |

Classes
`` |  | object _ErrorChecker Exception(BaseException) Error CopyError GLError GLUError GLUTError NullFunctionError
class CopyError(Error)
`` | `Raised to indicate that operation requires data-copying Currently only supported by the numpy array formathandler, if you set: OpenGL.arrays.numpymodule.NumpyHandler.ERROR_ON_COPY = True this error will be raised when the Numpy handler is passed a numpy array that requires copying to be passed to ctypes.`
| Method resolution order: CopyError Error Exception BaseException object Data descriptors inherited from Error: __weakref__ `list of weak references to the object (if defined)` Methods inherited from Exception: __init__(...) `x.__init__(...) initializes x; see x.__class__.__doc__ for signature` Data and other attributes inherited from Exception: __new__ = <built-in method __new__ of type object at 0x2b54fa49b080> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __reduce__(...) __repr__(...) `x.__repr__() <==> repr(x)` __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) __str__(...) `x.__str__() <==> str(x)` Data descriptors inherited from BaseException: __dict__ args message `exception message`
class Error(Exception)
`` | `Base class for all PyOpenGL-specific exception classes`
| Method resolution order: Error Exception BaseException object Data descriptors defined here: __weakref__ `list of weak references to the object (if defined)` Methods inherited from Exception: __init__(...) `x.__init__(...) initializes x; see x.__class__.__doc__ for signature` Data and other attributes inherited from Exception: __new__ = <built-in method __new__ of type object at 0x2b54fa49b080> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __reduce__(...) __repr__(...) `x.__repr__() <==> repr(x)` __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) __str__(...) `x.__str__() <==> str(x)` Data descriptors inherited from BaseException: __dict__ args message `exception message`
class GLError(Error)
`` | `OpenGL core error implementation class Primary purpose of this error class is to allow for annotating an error with more details about the calling environment so that it's easier to debug errors in the wrapping process. Attributes: err -- the OpenGL error code for the error result -- the OpenGL result code for the operation baseOperation -- the "function" being called pyArgs -- the translated set of Python arguments cArgs -- the Python objects matching 1:1 the C arguments cArguments -- ctypes-level arguments to the operation, often raw integers for pointers and the like description -- OpenGL description of the error (textual)`
| Method resolution order: GLError Error Exception BaseException object Methods defined here: __init__(self, err=None, result=None, cArguments=None, baseOperation=None, pyArgs=None, cArgs=None, description=None) `Initialise the GLError, storing metadata for later display` __repr__(self) `Produce a much shorter version of the error as a string` __str__(self) `Create a fully formatted representation of the error` format_baseOperation(self, property, value) `Format a baseOperation reference for display` format_description(self, property, value) `Format description using GLU's gluErrorString` shortRepr(self, value, firstLevel=True) `Retrieve short representation of the given value` Data and other attributes defined here: DISPLAY_ORDER = ('err', 'description', 'baseOperation', 'pyArgs', 'cArgs', 'cArguments', 'result') Data descriptors inherited from Error: __weakref__ `list of weak references to the object (if defined)` Data and other attributes inherited from Exception: __new__ = <built-in method __new__ of type object at 0x2b54fa49b080> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __reduce__(...) __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) Data descriptors inherited from BaseException: __dict__ args message `exception message`
class GLUError(Error)
`` | `GLU error implementation class`
| Method resolution order: GLUError Error Exception BaseException object Data descriptors inherited from Error: __weakref__ `list of weak references to the object (if defined)` Methods inherited from Exception: __init__(...) `x.__init__(...) initializes x; see x.__class__.__doc__ for signature` Data and other attributes inherited from Exception: __new__ = <built-in method __new__ of type object at 0x2b54fa49b080> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __reduce__(...) __repr__(...) `x.__repr__() <==> repr(x)` __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) __str__(...) `x.__str__() <==> str(x)` Data descriptors inherited from BaseException: __dict__ args message `exception message`
class GLUTError(Error)
`` | `GLUT error implementation class`
| Method resolution order: GLUTError Error Exception BaseException object Data descriptors inherited from Error: __weakref__ `list of weak references to the object (if defined)` Methods inherited from Exception: __init__(...) `x.__init__(...) initializes x; see x.__class__.__doc__ for signature` Data and other attributes inherited from Exception: __new__ = <built-in method __new__ of type object at 0x2b54fa49b080> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __reduce__(...) __repr__(...) `x.__repr__() <==> repr(x)` __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) __str__(...) `x.__str__() <==> str(x)` Data descriptors inherited from BaseException: __dict__ args message `exception message`
class NullFunctionError(Error)
`` | `Error raised when an undefined function is called`
| Method resolution order: NullFunctionError Error Exception BaseException object Data descriptors inherited from Error: __weakref__ `list of weak references to the object (if defined)` Methods inherited from Exception: __init__(...) `x.__init__(...) initializes x; see x.__class__.__doc__ for signature` Data and other attributes inherited from Exception: __new__ = <built-in method __new__ of type object at 0x2b54fa49b080> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __reduce__(...) __repr__(...) `x.__repr__() <==> repr(x)` __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) __str__(...) `x.__str__() <==> str(x)` Data descriptors inherited from BaseException: __dict__ args message `exception message`
class _ErrorChecker(object)
`` | `Global error-checking object Attributes: _registeredChecker -- the checking function enabled when not doing onBegin/onEnd processing safeGetError -- platform safeGetError function as callable method _currentChecker -- currently active checking function`
| Methods defined here: currentChecker(self) `Return the current error-checking function` glCheckError(self, result, baseOperation=None, cArguments=None, *args) `Base GL Error checker compatible with new ctypes errcheck protocol This function will raise a GLError with just the calling information available at the C-calling level, i.e. the error code, cArguments, baseOperation and result. Higher-level code is responsible for any extra annotations. Note: glCheckError relies on glBegin/glEnd interactions to prevent glGetError being called during a glBegin/glEnd sequence. If you are calling glBegin/glEnd in C you should call onBegin and onEnd appropriately.` nullGetError(self) `Used as error-checker when inside begin/end set` onBegin(self, target=None) `Called by glBegin to record the fact that glGetError won't work` onEnd(self, target=None) `Called by glEnd to record the fact that glGetError will work` registerChecker(self, checker=None) `Explicitly register an error checker This allows you to, for instance, disable error checking entirely. onBegin and onEnd will switch between nullGetError and the value registered here. If checker is None then the default` Static methods defined here: safeGetError = glGetError(...) Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`

Functions
`` |  | glCheckError(self, result, baseOperation=None, cArguments=None, *args) method of _ErrorChecker instance `Base GL Error checker compatible with new ctypes errcheck protocol This function will raise a GLError with just the calling information available at the C-calling level, i.e. the error code, cArguments, baseOperation and result. Higher-level code is responsible for any extra annotations. Note: glCheckError relies on glBegin/glEnd interactions to prevent glGetError being called during a glBegin/glEnd sequence. If you are calling glBegin/glEnd in C you should call onBegin and onEnd appropriately.` onBegin(self, target=None) method of _ErrorChecker instance `Called by glBegin to record the fact that glGetError won't work` onEnd(self, target=None) method of _ErrorChecker instance `Called by glEnd to record the fact that glGetError will work`

Data
`` |  | ErrorChecker = <OpenGL.error._ErrorChecker object at 0x2aaaab338110> __all__ = ('Error', 'GLError', 'GLUError', 'GLUTError', 'glCheckError')