| |
- object
-
- _ErrorChecker
- Exception(BaseException)
-
- Error
-
- CopyError
- GLError
- GLUError
- GLUTError
- NullFunctionError
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 _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)
| |