Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::TextureAssetManager Class Reference

Asset manager for texture assets keyed by filesystem path. More...

#include <TextureAsset.h>

Inheritance diagram for Engine::Assets::TextureAssetManager:
Collaboration diagram for Engine::Assets::TextureAssetManager:

Public Member Functions

 TextureAssetManager ()
 Creates an empty texture asset manager.
Public Member Functions inherited from Asset::AssetManager< Asset::Path, Texture >
 AssetManager ()=default
 Creates an empty asset manager.
virtual ~AssetManager ()=default
 Destroys the manager object.
void declare (Asset::Path path, Args &&... args)
 Adds an asset to the list in its unloaded state.
void add (Asset::Path path, Texture *asset)
 Adds or overwrites a previously declared asset at a key.
RefType getOrCreateRef (const Asset::Path &path)
 Gets a stable asset reference, creating a record if necessary.
RefType getRef (const Asset::Path &path) const
 Gets a stable asset reference if a record exists, otherwise an expired ref.
void setAssetLoadingState (const Asset::Path &path, LoadState state)
 Sets the record loading state without requiring a payload object.
void resolve (const Asset::Path &path, std::unique_ptr< Texture > asset)
 Stores a loaded payload and resolves the record's ready future.
void fail (const Asset::Path &path, std::string error)
 Marks the record as failed and resolves the ready future with an error.
void unloadAssetPayload (const Asset::Path &path)
 Drops the loaded payload while preserving the stable record.
bool exists (Asset::Path path)
 Checks if an asset already exists. This means it is declared and there is content.
bool isDeclared (Asset::Path path)
 Checks if an asset has been declared. If it exists it is also declared.
CpuLoadingState getAssetLoadingState (const Asset::Path &path)
 Gets a loading state for an asset. If the asset is not yet declared it will return that it is UNLOADED.
std::optional< Texture * > getAsset (const Asset::Path &path)
 Try's to get an asset. If the asset does not exist (can be checked with exists) it will return a std::nullopt.
virtual void clear ()
 Clears out all resources.
void forEachAsset (Func &&func) const
 Iterates over all assets and calls the provided callback for each.

Additional Inherited Members

Public Types inherited from Asset::AssetManager< Asset::Path, Texture >
using RefType
 Stable reference type returned by this manager.
using RecordType
 Internal record type stored by this manager.
using ResultType
 Completion result type for async loads.

Detailed Description

Asset manager for texture assets keyed by filesystem path.

Definition at line 91 of file TextureAsset.h.

Constructor & Destructor Documentation

◆ TextureAssetManager()

Engine::Assets::TextureAssetManager::TextureAssetManager ( )

Creates an empty texture asset manager.


The documentation for this class was generated from the following file:
  • /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Texture/TextureAsset.h