ctypes-based OpenGL wrapper for Python
This is the PyOpenGL 3.x tree, it attempts to provide a largely compatible API for code written with the PyOpenGL 2.x series using the ctypes foreign function interface system.
Configuration Variables:
There are a few configuration variables in this top-level module. Applications should be the only code that tweaks these variables, mid-level libraries should not take it upon themselves to disable/enable features at this level. The implication there is that your library code should be able to work with any of the valid configurations available with these sets of flags.
Further, once any entry point has been loaded, the variables can no longer be updated. The OpenGL._confligflags module imports the variables from this location, and once that import occurs the flags should no longer be changed.
This is intended to be turned off *only* in a production environment where you *know* that your code is entirely free of situations where you use exception-handling to handle error conditions, i.e. where you are explicitly checking for errors everywhere they can occur in your code.
Default: True
Errors are normally logged to the OpenGL.errors logger.
Only triggers if ERROR_CHECKING is True
Default: False
This effectively disables all list/tuple array support, as they are inherently copy-based.
This feature allows for optimisation of your application. It should only be enabled during testing stages to prevent raising errors on recoverable conditions at run-time.
Default: False
Default: False
To use this flag effectively, you will want to first set ERROR_ON_COPY to True and eliminate all cases where you are copying arrays. Copied arrays *will* segfault your application deep within the GL if you disable this feature!
Once you have eliminated all copying of arrays in your application, you will further need to be sure that all arrays which are passed to the GL are stored for at least the time period for which they are active in the GL. That is, you must be sure that your array objects live at least until they are no longer bound in the GL. This is something you need to confirm by thinking about your application's structure.
When you are sure your arrays won't cause seg-faults, you can set STORE_POINTERS=False in your application and enjoy a (slight) speed up.
Note: this flag is *only* observed when ERROR_ON_COPY == True, as a safety measure to prevent pointless segfaults
Default: True
Default: False
You will need to have a logging configuration (e.g. logging.basicConfig() ) call in your top-level script to see the results of the logging.
Default: False
Note that this is experimental, *not* reliable, and very slow!
Note that byte/char types are not wrapped.
Default: False
Default: True
Default: False
Default: True
Default: True
Default: False
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