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

[Impeller] Press z to toggle wireframe #40001

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

bdero
Copy link
Member

@bdero bdero commented Mar 2, 2023

... in the Entities and Aiks playgrounds. Works on all backends.

WASD gets used for fly camera controls in Impeller Scene playgrounds, so I used Z to sorta match the Blender shortcut. Before I add more playground features I'm going to come up with a better way to package playground tool logic between the different kinds of playgrounds. All Entities tools should be usable in the Aiks and DL playgrounds, etc. And there needs to be a GUI that stuff like this can hook into. We shouldn't just add a million shortcuts and call it a day.

Screen.Recording.2023-03-01.at.5.21.18.PM.mov

EntityPass is really good about not clearing attachments unnecessarily, and so uninitialized data shows up in these cases. We can add stuff to be smarter about this when "wireframe" is activated in the context, but not bothering to do so yet.

Screen.Recording.2023-03-01.at.5.45.58.PM.mov

@bdero bdero self-assigned this Mar 2, 2023
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@chinmaygarde
Copy link
Member

is really good about not clearing attachments unnecessarily

That's awesome 😄

And there needs to be a GUI that stuff like this can hook into

For stuff like this that is only needed in a few debug modes, you could take a look at macros that get stripped away in release modes. For instance, RL_CONSOLE_GET_RANGE_ONCE which expands to hooking into the GUI (via static vars 😱 ) which in the end is just ImGUI perhaps.

@jonahwilliams
Copy link
Member

it would be great if we could eventually expose this through the Dart service protocol. That would eventually let us add a toggle setting to IDEs and the command line flutter tools!

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

Looks Radical to Me

@bdero
Copy link
Member Author

bdero commented Mar 2, 2023

For stuff like this that is only needed in a few debug modes, you could take a look at macros that get stripped away in release modes.

Yes I think this would be good. 🤔 For the Entities I/O, I'm thinking about passing in an optional debug dispatch table to ContentContext on construction, and having Entities call into it using macros that melt away in prod.

For the ImGui inspector, my favorite idea so far is having an "inspector builder" accessible by all of the harness layers and playgrounds that can be used to append menu toggles and elements to special windows. The builder methods would take data pointers and pass them to ImGui when the whole UI is built at the end of the frame. And we could of course wrap these methods with convenient macros that create static vars like you did in radar. 😃

@bdero bdero merged commit afa877f into flutter:main Mar 2, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 2, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 2, 2023
…#121791)

Roll Flutter Engine from 6aeb15058721 to afa877f4bc7a (1 revision)
sourcegraph-bot pushed a commit to sgtest/megarepo that referenced this pull request Mar 2, 2023
…ne#40001) (#121791)

Commit: 0feea674ff65bc20a82893f8dbf38d5ece7b5834
chinmaygarde pushed a commit to chinmaygarde/flutter_engine that referenced this pull request Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants