pyglet.gl.gl_info

Information about version and extensions of current GL implementation.

Usage:

from pyglet.gl 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 pyglet.gl.gl_info import GLInfo

info = GLInfo()
info.set_active_context()

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

Classes

GLInfo Information interface for a single GL context.

Functions

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.
remove_active_context(self)
set_active_context(self) Store information for the currently active context.

Notes

Defined

  • util
  • warnings

Table Of Contents

Previous topic

pyglet.gl.gl

Next topic

GLInfo Class