GLInfo
¶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:
GLInfo.
get_extensions
()¶Get a list of available OpenGL extensions.
Returns: | a list of the available extensions. |
---|---|
Return type: | list of str |
GLInfo.
get_renderer
()¶Determine the renderer string of the OpenGL context.
Return type: | str |
---|
GLInfo.
get_vendor
()¶Determine the vendor string of the OpenGL context.
Return type: | str |
---|
GLInfo.
get_version
()¶Get the current OpenGL version.
Returns: | the OpenGL version |
---|---|
Return type: | str |
GLInfo.
have_extension
(extension)¶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 |
GLInfo.
have_version
(major, minor=0, release=0)¶Determine if a version of OpenGL is supported.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if the requested or a later version is supported. |
GLInfo.
remove_active_context
()¶GLInfo.
set_active_context
()¶Store information for the currently active context.
This method is called automatically for the default context.