Merging meshes with different primitive topologies leads to rendering panics rather than returning an error #18546
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
D-Domain-Agnostic
Can be tackled by anyone with generic programming or Rust skills
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
Bevy version
0.15.3
What you did
Created an empty Mesh, tried to merge another Mesh into it:
And used the merged Mesh for rendering.
What went wrong
What were you expecting?
Error handling.
Bevy to catch the invalid mesh earlier, and to point out the entity id and its components, to make it possible to find the mesh in the code. Without any diagnostic info, you're left guessing what Mesh it was.
Mesh::merge
to return aResult
, rather than produce a Mesh that Bevy renderer panics on.Additional information
Pretty sure merge produced an empty mesh because
another_mesh
had some NaNs in its values.The text was updated successfully, but these errors were encountered: