Information interface for a single GL context.
A default instance is created automatically when the first OpenGL context is created. You can use the module functions as a convenience for this default instance’s methods.
If you are using more than one context, you must call set_active_context when the context is active for this GLInfo instance.
Methods:
get_extensions() Get a list of available OpenGL extensions. get_renderer() Determine the renderer string of the OpenGL context. get_vendor() Determine the vendor string of the OpenGL context. get_version() Get the current OpenGL version. have_extension(extension) Determine if an OpenGL extension is available. have_version(major[, minor, release]) Determine if a version of OpenGL is supported. remove_active_context() set_active_context() Store information for the currently active context.
Attributes:
extensions Type: set have_context Type: bool renderer Type: str vendor Type: str version Type: str
Get a list of available OpenGL extensions.
Returns: | a list of the available extensions. |
---|---|
Return type: | list of str |
Determine the renderer string of the OpenGL context.
Return type: | str |
---|
Determine the vendor string of the OpenGL context.
Return type: | str |
---|
Get the current OpenGL version.
Returns: | the OpenGL version |
---|---|
Return type: | str |
Determine if an OpenGL extension is available.
Parameters: | extension (str) – The name of the extension to test for, including its GL_ prefix. |
---|---|
Returns: | True if the extension is provided by the driver. |
Return type: | bool |
Determine if a version of OpenGL is supported.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if the requested or a later version is supported. |
Store information for the currently active context.
This method is called automatically for the default context.