NWengine 0.9
|
The base class for all assets. More...
#include <Asset.h>
Public Member Functions | |
virtual Asset * | GetFromCache (void *identifier) |
Get the asset from the cache based on the identifier. | |
virtual Asset * | LoadFromFileOrGetFromCache (void *identifier, const char *path, void *data) |
Load the asset from file or get it from the cache based on the identifier and file path. | |
virtual Asset * | LoadFromFile (const char *path, void *data=nullptr) |
Load the asset from file based on the file path. | |
virtual Asset * | LoadFromBuffer (void *buffer, void *data) |
Load the asset from a buffer. | |
virtual Asset * | LoadFromBufferOrGetFromCache (void *identifier, void *buffer, void *data) |
Load the asset from a buffer or get it from the cache based on the identifier. | |
virtual void | Clean () |
Clean up the asset. | |
Public Attributes | |
int | _usageCounter = 0 |
The base class for all assets.
|
virtual |
Load the asset from a buffer or get it from the cache based on the identifier.
identifier | The identifier of the asset. |
buffer | The buffer containing the asset data. |
data | Additional data for loading the asset. |
|
virtual |
Load the asset from file or get it from the cache based on the identifier and file path.
identifier | The identifier of the asset. |
path | The file path of the asset. |
data | Additional data for loading the asset. |