Namespace P64::Mem¶
Classes¶
Functions¶
-
surface_t &P64::Mem::allocDepthBuffer(uint32_t width, uint32_t height)¶
Lazily allocates a depth buffer of the given size.
If already allocated, it will return the same buffer. If the given size is different, the old buffer will be freed and a new one created.
- Parameters:
width –
height –
- Returns:
-
void P64::Mem::freeDepthBuffer()¶
Free the depth buffer, NOP if none was allocated.
This is also done automatically in ‘allocDepthBuffer’ if re-allocation is needed.
-
int32_t P64::Mem::getHeapDiff()¶
Checks heap stats to detect memory leaks.
This will intern remember the heap from the last time it was called and compare it against the current heap.
- Returns:
heap-different in bytes
-
inline void P64::Mem::clearSurface(surface_t &surf)¶