Drawing calls
ay2d_drawables
uint32_t ay2d_drawables(const ay2d_model *m, ay2d_drawable *out, size_t n);
The visible meshes after the last update, back to front. Returns how many
there are and writes the first n; pass NULL, 0 to just get the count.
The views stay valid until the update after next starts. Thread: any,
even while an update runs.
ay2d_mesh_geometry
ay2d_status ay2d_mesh_geometry(const ay2d_model *m, uint32_t mesh, ay2d_drawable *out);
One mesh after the last update, visible or not, with opacity 1. Use it for
masks that are not drawn themselves, and to set up GPU buffers once.
Thread: any.
ay2d_mesh_changes
ay2d_status ay2d_mesh_changes(const ay2d_model *m, uint32_t *out, size_t n);
One word of AY2D_CHANGED_* bits per mesh, saying what the last update
changed. n must be at least the mesh count. Thread: any.
ay2d_texture
ay2d_status ay2d_texture(const ay2d_model *m, uint32_t i,
const uint8_t **bytes, size_t *len);
Texture page i as PNG bytes with straight alpha; decode it with your own
image loader once at load. A model loaded from a .moc3 has empty pages,
because the textures are yours. Thread: any.