Skip to content

Support element buffers for topologies other than triangle list #880

@leftmostcat

Description

@leftmostcat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions