#880·Fyrox

Support element buffers for topologies other than triangle list

Author: leftmostcatCreated Dec 20, 2025Updated Dec 20, 2025

Problem this feature should fix

Currently, TriangleBuffer is seemingly the only way to create an element buffer for a mesh, requiring that primitives be supplied as a Vec<TriangleDescription>. This creates extra work for loading custom formats which specify primitives as triangle strips or fans.

Expected solution

Ideally, element buffers could be provided as a raw buffer with a description of topology, similar to VertexBuffer::new_with_layout(). This would not prevent the use of methods to create the buffer from a list of structured primitives, e.g. TriangleDescription, but would provide full flexibility to API consumers and allow use of formats with baked element buffers without the need for additional processing.