Skip to content

Conversation

@tychedelia
Copy link
Member

Objective

Adding more features to AsBindGroup proc macro means making the trait arguments uglier. Downstream implementors of the trait without the proc macro might want to do different things than our default arguments.

Solution

Make AsBindGroup take an associated Param type.

Migration Guide

AsBindGroup now allows the user to specify a SystemParam to be used for creating bind groups.

@tychedelia tychedelia added A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward C-Feature A new feature, making something new possible labels Aug 24, 2024
Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I think this solves a relatively niche problem so not entirely sure it's required but I personally like this solution.

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I quite like this too! Well-implemented, and a good use of existing tools.

@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide and removed C-Feature A new feature, making something new possible S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 25, 2024
@tychedelia
Copy link
Member Author

Great, this will help me rebase #14663 to be a little cleaner. One other thing I'd note is that this allows custom implementors to be a little smarter about caching their own bind groups.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Aug 25, 2024
Merged via the queue into bevyengine:main with commit 1caa64d Aug 25, 2024
bas-ie added a commit to bas-ie/bevy_ecs_tilemap that referenced this pull request Oct 25, 2024
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-Usability A targeted quality-of-life change that makes Bevy easier to use M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants