SafiMesh
A SafiMesh is a pair of SDL_GPUBuffers (vertex + index) plus their counts. The engine uses a fixed interleaved vertex layout so the same material pipeline can draw any mesh.
Vertex layout
Pitch is sizeof(SafiVertex) (32 bytes). Indices are always 32-bit unsigned.
Types
Functions
safi_mesh_create
Creates the VBO and IBO, then uploads vertices and indices through a transfer buffer. Returns false on any failure (out-of-memory, invalid device, etc.).
safi_mesh_destroy
Releases both GPU buffers.
Example — triangle
See also
safi_gltf_load— loads a mesh straight from a .glbSafiMaterial