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.
ClassesPer-API error-checking object
Attributes: _registeredChecker -- the checking function enabled when not doing onBegin/onEnd processing _currentChecker -- currently active checking function
__bool__(
self)
We are "true" if we actually do anything
__init__(
self , platform , baseOperation = None , noErrorResult = 0)
Initialize from a platform module/reference
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 no error checking should be done
onBegin(
self)
Called by glBegin to record the fact that glGetError won't work
onEnd(
self)
Called by glEnd to record the fact that glGetError will work
safeGetError(
self)
Check for error, testing for context before operation
Raised to indicate that operation requires data-copying
if you set: OpenGL.ERROR_ON_COPY = True
before importing OpenGL.GL, this error will be raised when a passed argument would require a copy to be made.
Base class for all PyOpenGL-specific exception classes
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:
(
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
GLU error implementation class
GLUT error implementation class
Raised to indicate that there is no currently active context
Technically almost *any* OpenGL call can segfault if there is no active context. The OpenGL.CHECK_CONTEXT flag, if enabled will cause this error to be raised whenever a GL or GLU call is issued (via PyOpenGL) if there is no currently valid context.
Error raised when an undefined function is called
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4