namespace
resourcedeals with resource creation, tracking, and managing.
classes
enums
functions
Enum documentation
Function documentation
template<typename T>
static handle<T> core:: resource:: create_shared(cache& cache,
const UID& uid)
Details
will either find the resource with the given UID, and return that, or create a new one using that UID. this function should be used for resources that might be shared (like gfx::
The resulting resource keeps the UID you create it with, meaning it can be found again using this function.
template<typename T>
static handle<T> core:: resource:: create(cache& cache,
const UID& uid)
Brief
creates a new resource based on the given UID resource.
Details
if this resource is disk-based it might speed up loading due to using the already cached value (todo) The resulting resource has a new UID.
template<typename T, typename... Args>
static handle<T> core:: resource:: copy(cache& cache,
const handle<T>& source,
Args && ... args)
Details
this will create a disconnected copy based on the source handle. This means that, for example, when the source gets destroyed, this copy will keep existing, and when changes happen to either the source or copy, the changes will not be applied to the other.