OpenTTD Source: OpenGLSpriteAllocator Class Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Data Fields | Protected Member Functions
OpenGLSpriteAllocator Class Reference
Inheritance diagram for OpenGLSpriteAllocator:

## Public Member Functions
| OpenGLSpriteAllocator (OpenGLSpriteLRUCache &lru, SpriteID sprite)
Public Member Functions inherited from SpriteAllocator
template<typename T >
T * | Allocate (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 1090 of file opengl.cpp.

## Constructor & Destructor Documentation

## ◆ OpenGLSpriteAllocator()

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

Definition at line 1095 of file opengl.cpp.

## Member Function Documentation

## ◆ AllocatePtr()

void * OpenGLSpriteAllocator::AllocatePtr | ( | size_t | size | ) |
| inlineoverrideprotectedvirtual

Allocate memory for a sprite.

Parameters

  size | Size of memory to allocate.

Returns
  Pointer to allocated memory.

Implements SpriteAllocator.

Definition at line 1097 of file opengl.cpp.

## Field Documentation

## ◆ lru

OpenGLSpriteLRUCache& OpenGLSpriteAllocator::lru

Definition at line 1092 of file opengl.cpp.

## ◆ sprite

SpriteID OpenGLSpriteAllocator::sprite

Definition at line 1093 of file opengl.cpp.

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

- src/video/opengl.cpp