Code review / Q&A request - colored wireframes #6358
Unanswered
LightAndLight
asked this question in
Q&A
Replies: 1 comment
-
I'm not a member of the project, but it is likely better to just put it up as a draft PR. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bevy's current wireframe plugin hard-codes the wireframe color. I wanted per-entity wireframe colors, so I created my own plugin based on the one in
bevy_pbr
.I've got it working, but suspect there's a nicer way to do it. There are also a few Bevy renderer things that I copied from the original plugin that I don't understand.
If you're feeling generous with your time, I'd love to hear your feedback. I also have some specific questions, in case you don't want to peruse my code.
My plugin:
Specific questions:
colored_wireframe.rs#L61-L75 - Is there a better place to create and store the bind group layout?
colored_wireframe.rs#L80-L103, colored_wireframe.rs#L219, colored_wireframe.rs#L233, colored_wireframe.rs#L241-L257, colored_wireframe.rs#L296 - What is pipeline specialization and why do I need to use it?
colored_wireframe.rs#L94-L99 - This feels janky. Is there a better way to add a bind group layout to the layout I inherited from the mesh pipeline?
colored_wireframe.rs#L154-L172 - Is it expensive to re-create a bind group each frame? The
DynamicUniformBuffer
I'm using might allocate new graphics buffers without me knowing, and binding every frame was the easiest way to make things work.Beta Was this translation helpful? Give feedback.
All reactions