Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Variables
AssetManager.h File Reference

Central cache for loaded engine assets, including TaskGraphTemplate instances. More...

#include <string>
#include <vector>
#include <unordered_map>
#include <memory>
#include <cstdint>
#include "../TaskSystem/TaskGraphTemplate.h"
+ Include dependency graph for AssetManager.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Olympe::AssetManager
 Singleton cache for engine assets. More...
 

Namespaces

namespace  Olympe
 < Provides AssetID and INVALID_ASSET_ID
 

Typedefs

using Olympe::AssetID = uint32_t
 Opaque asset identifier: 32-bit FNV-1a hash of the asset file path.
 

Variables

static const AssetID Olympe::INVALID_ASSET_ID = 0u
 Sentinel value indicating an invalid / unloaded asset.
 

Detailed Description

Central cache for loaded engine assets, including TaskGraphTemplate instances.

Author
Olympe Engine
Date
2026-02-22

AssetManager is a singleton that loads, caches, and manages the lifetime of shared engine assets. Phase 1.3 adds support for TaskGraphTemplate assets:

Asset IDs are 32-bit FNV-1a hashes of the normalised file path so that the same path always yields the same ID without requiring a central registry.

Ownership: AssetManager owns all loaded TaskGraphTemplate instances via unique_ptr. Callers receive a raw pointer (non-owning) from GetTaskGraph(). The pointer remains valid until UnloadTaskGraph() or ~AssetManager() is called.

C++14 compliant - no std::variant, std::optional, or C++17/20 features.

Definition in file AssetManager.h.