-BlockAllocator is no longer template

-Multithreaded IDManager.getNewID()
 *use implementation with free IDs stack (instead of classic pool)
-support for multiple UpdatePasses. Passes are added by name, and must be called between begin() end() functions.
-removed mutex from addEntity()
-commit() function added. Used to commit all changes made while update() call. Called automatically by begin() end() functions.
This commit is contained in:
Mergul 2018-10-25 11:46:08 +02:00
parent 430ce8074c
commit d3f7593afc
6 changed files with 406 additions and 189 deletions

View file

@ -5,8 +5,11 @@ import ecs.manager;
import std.experimental.allocator;
import std.experimental.allocator.mallocator : AlignedMallocator, Mallocator;
struct BlockAllocator(uint block_size, uint blocks_in_allocation)
struct BlockAllocator//(uint block_size, uint blocks_in_allocation)
{
private uint block_size;
private uint blocks_in_allocation;
void* next_block = null;
void* getBlock()