Module pyglet.graphics.allocation

Memory allocation algorithm for vertex arrays and buffers.

The region allocator is used to allocate vertex indices within a vertex domain's multiple buffers. ("Buffer" refers to any abstract buffer presented by pyglet.graphics.vertexbuffer.

The allocator will at times request more space from the buffers. The current policy is to double the buffer size when there is not enough room to fulfil an allocation. The buffer is never resized smaller.

The allocator maintains references to free space only; it is the caller's responsibility to mantain the allocated regions.

Classes

  AllocatorMemoryException
The buffer is not large enough to fulfil an allocation.
  Allocator
Buffer space allocation implementation.