Kohi Game Engine
|
An "interface" for a resource loader. All registered loaders use this. More...
#include <resource_system.h>
Data Fields | |
u32 | id |
The loader identifier. More... | |
resource_type | type |
The loader resource type. More... | |
const char * | custom_type |
The loader custom type string, if type is set to custom. More... | |
const char * | type_path |
A type path which is prepended for the asset type. More... | |
b8(* | load )(struct resource_loader *self, const char *name, void *params, resource *out_resource) |
Loads a resource using this loader. More... | |
void(* | unload )(struct resource_loader *self, resource *resource) |
Unloads the given resource. Loader is determined by the resource's assigned loader id. More... | |
An "interface" for a resource loader. All registered loaders use this.
const char* custom_type |
The loader custom type string, if type is set to custom.
u32 id |
The loader identifier.
b8(* load) (struct resource_loader *self, const char *name, void *params, resource *out_resource) |
Loads a resource using this loader.
self | A pointer to the loader itself. |
name | The name of the resource to be loaded. |
params | Parameters to be passed to the loader, or 0. |
out_resource | A pointer to hold the loaded resource. |
resource_type type |
The loader resource type.
const char* type_path |
A type path which is prepended for the asset type.
void(* unload) (struct resource_loader *self, resource *resource) |
Unloads the given resource. Loader is determined by the resource's assigned loader id.
self | A pointer to the loader itself. |
name | The name of the resource to be unloaded. |