pyglet.graphics

Submodules

Details

Low-level graphics rendering and abstractions.

This module provides efficient abstractions over OpenGL objects, such as Shaders and Buffers. It also provides classes for highly performant batched rendering and grouping.

See the Shaders and Rendering for details on how to use this graphics API.

exception GraphicsAPIError

An exception that occurs from the graphics API directly.

exception GraphicsBackendError

The base exception class for all graphics backends.

exception GraphicsIntegrationError

An exception that occurs from pyglets internal graphics integration of the APIs.

exception UnsupportedBackendError

Raised when a graphics feature is unavailable on the active backend.

__init__(
functionality: str,
backend: GraphicsAPI | None = None,
) None