cf_mesh_append_attributes¶
Category: graphics
GitHub: cute_graphics.h
Appends vertex attributes to a mesh after creation.
void cf_mesh_append_attributes(CF_Mesh mesh, const CF_VertexAttribute* attributes, int attribute_count);
| Parameters | Description |
|---|---|
mesh |
The mesh. |
attributes |
The attributes to append. See CF_VertexAttribute. |
attribute_count |
How many to append. |
Remarks¶
Chiefly for per-instance attributes (per_instance set to true): a mesh created with
only its vertex layout can gain instancing later without being rebuilt -- declare the
instance attributes here, then call cf_mesh_set_instance_buffer and
cf_mesh_update_instance_data. Appending beyond CF_MESH_MAX_VERTEX_ATTRIBUTES
ignores the extras, matching cf_make_mesh.
Related Pages¶
CF_Mesh
cf_make_mesh
CF_VertexAttribute
cf_mesh_set_instance_buffer
cf_mesh_update_instance_data