Skip to content

Loader Format

Brett Nash edited this page Apr 8, 2022 · 2 revisions

Engines frequently need to load data from a variety of sources. Having a uniform way of loading and caching them is thus extremely useful. Turtle has a loader / cache system which sues a simple consistent API to do that loading.

Blobby

Loaders are integrated into the blobby loaders. A blobby is a blob of data. It has a size, and a data pointer. Optionally it may contain a name. When you are finished with a blobby, you just call talloc_free on it.

Api

Loaders support a single API call: loader_object_load(struct loader *, const char *identifier);

On creation most loaders should support a nested loader. So loader A can call loader B.

On error, the loader should return NULL.

Clone this wiki locally