Information about version and extensions of current GL implementation.


from import gl_info

if gl_info.have_extension('GL_NV_register_combiners'):
    # ...

If you are using more than one context, you can set up a separate GLInfo object for each context. Call set_active_context after switching to the context:

from import GLInfo

info = GLInfo()

if info.have_version(2, 1):
    # ...


GLInfo Information interface for a single GL context.


get_extensions(self) Get a list of available OpenGL extensions.
get_renderer(self) Determine the renderer string of the OpenGL context.
get_vendor(self) Determine the vendor string of the OpenGL context.
get_version(self) Get the current OpenGL version.
have_context() Determine if a default OpenGL context has been set yet.
have_extension(self, extension) Determine if an OpenGL extension is available.
have_version(self, major[, minor, release]) Determine if a version of OpenGL is supported.
set_active_context(self) Store information for the currently active context.



  • util
  • warnings

Table Of Contents

Previous topic

Next topic

GLInfo Class