natiny_resource_load
C
NatinyResource natiny_resource_load(const char* path);
Synchronously loads a resource from disk (or network on web).
Parameters
| Name |
Type |
Description |
path |
const char* |
Path to the resource file |
Returns
| Type |
Description |
NatinyResource |
Resource handle, or 0 when loading fails |
Example
C
NatinyResource res = natiny_resource_load("data/image.png");
Notes
- This call blocks until the resource is fully loaded.
- Native failure is reported on stderr and returns
0.
- For non-blocking loading, see
natiny_resource_load_async().