OpenTTD Source 20260304-master-g1baaa74679
OpenGLSpriteAllocator Class Reference
Inheritance diagram for OpenGLSpriteAllocator:
SpriteAllocator

Public Member Functions

 OpenGLSpriteAllocator (OpenGLSpriteLRUCache &lru, SpriteID sprite)
Public Member Functions inherited from SpriteAllocator
virtual ~SpriteAllocator ()=default
 Ensure the destructor of the sub classes are called as well.
template<typename T>
TAllocate (size_t size)
 Allocate memory for a sprite.

Data Fields

OpenGLSpriteLRUCache & lru
SpriteID sprite

Protected Member Functions

void * AllocatePtr (size_t) override
 Allocate memory for a sprite.

Detailed Description

Definition at line 1116 of file opengl.cpp.

Constructor & Destructor Documentation

◆ OpenGLSpriteAllocator()

OpenGLSpriteAllocator::OpenGLSpriteAllocator ( OpenGLSpriteLRUCache & lru,
SpriteID sprite )
inline

Definition at line 1121 of file opengl.cpp.

Member Function Documentation

◆ AllocatePtr()

void * OpenGLSpriteAllocator::AllocatePtr ( size_t size)
inlineoverrideprotectedvirtual

Allocate memory for a sprite.

Parameters
sizeSize of memory to allocate.
Returns
Pointer to allocated memory.

Implements SpriteAllocator.

Definition at line 1123 of file opengl.cpp.

Field Documentation

◆ lru

OpenGLSpriteLRUCache& OpenGLSpriteAllocator::lru

Definition at line 1118 of file opengl.cpp.

◆ sprite

SpriteID OpenGLSpriteAllocator::sprite

Definition at line 1119 of file opengl.cpp.


The documentation for this class was generated from the following file: