Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Grindstone::DeferredDeletionQueue Class Reference

A series of per-frame DeletionQueues that allow the game to delete resources all at once. More...

#include <DeferredDeletionQueue.hpp>

Public Member Functions

 DeferredDeletionQueue (uint8_t frameCount, uint32_t poolSize)
 DeferredDeletionQueue (const DeferredDeletionQueue &other)=default
 DeferredDeletionQueue (DeferredDeletionQueue &&other) noexcept=default
DeferredDeletionQueue & operator= (const DeferredDeletionQueue &other)=default
DeferredDeletionQueue & operator= (DeferredDeletionQueue &&other) noexcept=default
void Initialize (uint8_t frameCount, uint32_t poolSize)
void PushDeletion (std::function< void()> fn)
void DeleteAll ()
void DeleteForFrame ()
void SetCurrentImageIndex (size_t newFrameIndex)

Protected Attributes

std::vector< DeletionQueue > queues
size_t frameIndex = 0

Detailed Description

A series of per-frame DeletionQueues that allow the game to delete resources all at once.

Memory in a dynamic allocator can be allocated and deallocated freely, with no restrictions. Allocations have a header that points to the next block of memory, and so free memory can be found in between allocated blocks of memory.


The documentation for this class was generated from the following files:
  • /github/workspace/sources/code/Common/DeferredDeletionQueue.hpp
  • /github/workspace/sources/code/Common/DeferredDeletionQueue.cpp