class GL.GLConfig

The GLConfig class of the GL submodule provides a bundle of attributes for configuring an OpenGL context. It also provides facilities for testing whether a given set of attributes is supported and finding out what attributes are supported on the platform where the application is running.

Properties

double_buffer
True if double buffering is desired.

alpha
True if an alpha channel is required.

color_size
Desired number of bits per color buffer component.

alpha_size
Desired number of bits per alpha channel component.

stereo
True if a stereoscopic context is required.

aux_buffers
Number of auxiliary buffers required.

depth_buffer
True if a depth buffer is required.

depth_size
Desired number of bits per depth buffer element.

stencil_buffer
True if a stencil buffer is required.

stencil_size
Desired number of bits per stencil buffer element.

accum_buffer
True if an accumulation buffer is required.

accum_size
Desired number of bits per accumulation buffer element.

multisample
True if a multisampled context is desired.

samples_per_pixel
Desired number of samples per pixel when multisampling is active.

Methods

supported(mode = 'both')
Tests whether the requested combination of attributes, or something close to them, can be satisfied. If successful, a new GLConfig instance is returned whose attributes reflect those actually available. Otherwise, None is returned.

The mode parameter may be 'screen', 'pixmap' or 'both' to request a configuration suitable for drawing to a GLView, a GLPixmap, or both a GLView and a GLPixmap.