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 maintain the allocated regions.
- exception AllocatorMemoryException
The buffer is not large enough to fulfil an allocation.
Raised by Allocator methods when the operation failed due to lack of buffer space. The buffer should be increased to at least requested_capacity and then the operation retried (guaranteed to pass second time).