![]() TGE Version 1.5.2 | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
FrameAllocator Class Reference#include <frameAllocator.h>
Detailed DescriptionTemporary memory pool for per-frame allocations.In the course of rendering a frame, it is often necessary to allocate many small chunks of memory, then free them all in a batch. For instance, say we're allocating storage for some vertex calculations:
// Get FrameAllocator memory... U32 waterMark = FrameAllocator::getWaterMark(); F32 * ptr = (F32*)FrameAllocator::alloc(sizeof(F32)*2*targetMesh->vertsPerFrame); ... calculations ... // Free frameAllocator memory FrameAllocator::setWaterMark(waterMark);
Member Function Documentation
Field Documentation
|