`MeshAllocator::mesh_index_slice()` mixes error and non-error codepath in return
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
`MeshAllocator::mesh_index_slice()` can return `None` if:
- the index buffer was not allocated, which means the mesh cannot be rendered at this time, so the application needs to skip further work related to that mesh and not issue rendering commands with it; and
- the mesh is a non-indexed mesh, which means (if the vertex buffer is otherwise allocated) that the mesh is ready for rendering and the application can proceed.
So there's no way to tell how the caller should behave when `None` is returned. For now I assume that if `mesh_vertex_slice()` returned a valid allocation then any index buffer was also successfully allocated, so I treat `None` as "the mesh was successfully allocated but is non-indexed". However it would be better if the API would make that unambiguous.
Contributor guide
Assessment
This issue has not been assessed yet.