bevyengine / bevyengine/bevy

Remove indices from Mesh and into NewType

Open
#15,986 3 comments 1 reaction 0 assignees View on GitHub
A-Rendering C-Feature S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

When creating a Mesh that have multiple materials, it is necessary to split that Mesh into multiple Meshes, each referencing a different material, that causes duplication of vertices.

## What solution would you like?

Create a new Asset `MeshIndices` and a new NewType `Mesh3dIndexed(Handle, Handle)`. `Mesh3d` would refer to meshes that does not have a indices list. The same for `Mesh2d`.

## Additional context

I tried looking into how Gltf stores the vertex buffers, if it is already split into the primitives or not, but the file format that I am using stores the vertices into a single buffer, and has a list of faces that references 3 vertices and the texture.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.