# Class pyglet.image.BufferManager

Manages the set of framebuffers for a context.

Use get_buffer_manager to obtain the instance of this class for the current context.

## Methods

| __init__(self)
4-tuple of float. | get_viewport(self) Get the current OpenGL viewport dimensions.
ColorBufferImage | get_color_buffer(self) Get the color buffer.
ColorBufferImage | get_aux_buffer(self) Get a free auxilliary buffer.
DepthBufferImage | get_depth_buffer(self) Get the depth buffer.
BufferImageMask | get_buffer_mask(self) Get a free bitmask buffer.

## Method Details

### get_viewport

get_viewport(self)
Get the current OpenGL viewport dimensions.

Returns:
  4-tuple of float.: Left, top, right and bottom dimensions.

### get_aux_buffer

get_aux_buffer(self)

Get a free auxilliary buffer.

If not aux buffers are available, ImageException is raised. Buffers are released when they are garbage collected.

Returns: ColorBufferImage

### get_buffer_mask

get_buffer_mask(self)

Get a free bitmask buffer.

A bitmask buffer is a buffer referencing a single bit in the stencil buffer. If no bits are free, ImageException is raised. Bits are released when the bitmask buffer is garbage collected.

Returns: BufferImageMask