Expose more of the Vec API on BufferVec #3531
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
D-Trivial
Nice and easy! A great choice to get started with Bevy
What problem does this solve or what need does it fill?
More efficient mutation APIs for
BufferVec
than justpush
,reserve
, andclear
. Repeatedlypush
ing large quantities can be quite inefficient due to needing to repeatedly do size and capacity checks on the underlying Vec.What solution would you like?
Expose more of the mutation APIs to more efficiently build
BufferVecs
. Most notablyappend
for grouping chains ofVec
s together.What alternative(s) have you considered?
push
ing the items onto theBufferVec
.DerefMut
on the underlyingVec
.Additional context
This would both simplify and speed up the "prepare" stage of rendering of entities with large quantities of mutable values, including but not limited to particle systems and large scale batching.
The text was updated successfully, but these errors were encountered: