OpenGL and GLU interface.

This package imports all OpenGL, GLU and registered OpenGL extension functions. Functions have identical signatures to their C counterparts. For example:

from import *

# [...omitted: set up a GL context and framebuffer]
glVertex3f(0, 0, 0)
glVertex3f(0.1, 0.2, 0.3)
glVertex3f(0.1, 0.2, 0.3)

OpenGL is documented in full at the OpenGL Reference Pages.

The OpenGL Programming Guide is a popular reference manual organised by topic. The free online version documents only OpenGL 1.1. Later editions cover more recent versions of the API and can be purchased from a book store.

The following subpackages are imported into this “mega” package already (and so are available by importing
ARB registered OpenGL extension functions

These subpackages are also available, but are not imported into this namespace by default:
nVidia OpenGL extension functions
AGL (Mac OS X OpenGL context functions)
GLX (Linux OpenGL context functions)
ARB registered GLX extension functions
nvidia GLX extension functions
WGL (Windows OpenGL context functions)
ARB registered WGL extension functions
nvidia WGL extension functions

The information modules are provided for convenience, and are documented below.


gl Wrapper for /usr/include/GL/gl.h
gl_info Information about version and extensions of current GL implementation.
glu Wrapper for /usr/include/GL/glu.h
glu_info Information about version and extensions of current GLU implementation.



get_current_context() Return the active OpenGL context.


compat_platform = 'linux2'

str(object=’‘) -> string

Return a nice string representation of the object. If the argument is a string, the return value is the same object.



  • glext_arb
  • lib_glx

Table Of Contents

Previous topic

load Function

Next topic