Resource::LoadResource
Defined in:
Loads the data for a resource object.
C4Resources.h
Prototype
ResourceResult LoadResource(ResourceLoader *loader);
Parameters
loader |
An open loader object that can read the resource data. |
Description
The LoadResource
function loads the data for a resource object that was created by passing the kResourceDeferLoad
flag to the Resource::GetResource
function. The ResourceLoader
object passed in the loader
parameter should have been opened by calling the Resource::OpenLoader
function for the same resource object for which the LoadResource
function is called.If the resource data is successfully loaded, then the return value is
kResourceOkay
. Otherwise, the return value is kResourceLoadFailed
.Once the resource data has been loaded into a resource object, the resource object owns the data and will release it properly. The
Load
function should not be called more than once for the same resource object.
See Also