Version: beta
FUNCTION | |
---|---|
AddFile() | Adds a file to the resource system Any request for... |
Get() | Get a resource from factory |
Get() | Get a resource from factory |
PreloadHint() | Hint the preloader what to load before Create is c... |
RegisterResourceDecryptionFunction() | Registers a custom resource decryption function |
RegisterType() | |
Release() | Release resource |
RemoveFile() | Removes a previously registered file from the reso... |
SetupType() | Setup function pointers and context for a resource... |
AddFile(factory,path,size,resource)
Adds a file to the resource system Any request for this path will go through any existing mounts first. If you wish to provide file overrides, please use the LiveUpdate feature for that. The file isn't persisted between sessions.
PARAMETERS
factory |
dmResource::HFactory |
Factory handle |
path |
const char* |
The path of the resource |
size |
uint32_t |
The size of the resource (in bytes) |
resource |
const void* |
The resource payload |
RETURNS
RESULT_OK |
dmResource::Result | on success. |
Get(factory,name,resource)
Get a resource from factory
PARAMETERS
factory |
dmResource::HFactory |
Factory handle |
name |
const char* |
Resource name |
resource |
void** |
Created resource |
RETURNS
result |
dmResource::Result | RESULT_OK on success |
Get(factory,name,resource)
Get a resource from factory
PARAMETERS
factory |
dmResource::HFactory |
Factory handle |
name |
dmhash_t |
Resource name |
resource |
void** |
Created resource |
RETURNS
result |
dmResource::Result | RESULT_OK on success |
PreloadHint(factory,name)
Hint the preloader what to load before Create is called on the resource. The resources are not guaranteed to be loaded before Create is called. This function can be called from a worker thread.
PARAMETERS
factory |
dmResource::HResourcePreloadHintInfo |
Preloader handle |
name |
const char* |
Resource name |
RETURNS
result |
bool | if successfully invoking preloader. |
RegisterResourceDecryptionFunction(decrypt_resource)
Registers a custom resource decryption function
PARAMETERS
decrypt_resource |
dmResource::FDecryptResource |
The decryption function |
RegisterType()
PARAMETERS
None
Release(factory,resource)
Release resource
PARAMETERS
factory |
dmResource::HFactory |
Factory handle |
resource |
void* |
Resource pointer |
RemoveFile(factory,path)
Removes a previously registered file from the resource system
PARAMETERS
factory |
dmResource::HFactory |
Factory handle |
path |
const char* |
The path of the resource |
RETURNS
RESULT_OK |
dmResource::Result | on success. |
SetupType()
Setup function pointers and context for a resource type
PARAMETERS
None