Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vertex attribute validation to Material trait #6128

Open
IceSentry opened this issue Sep 29, 2022 · 0 comments
Open

Add vertex attribute validation to Material trait #6128

IceSentry opened this issue Sep 29, 2022 · 0 comments
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible C-Usability A targeted quality-of-life change that makes Bevy easier to use

Comments

@IceSentry
Copy link
Contributor

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

Mesh attributes required by a material are not validated when using a material with a mesh.

What solution would you like?

Extend the Material trait with something similar to fn required_mesh_attributes() -> Option<Vec<MeshVertexAttribute>>.

The default behaviour would return None and not validate anything. Otherwise, the validation would check that each attributes is present on the mesh and ignore other attributes since passing more attributes should be allowed.

What alternative(s) have you considered?

N/A

Additional context

Proposed in #6127 by @devil-ira

@IceSentry IceSentry added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible C-Usability A targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant