Replies: 2 comments 1 reply
-
I rather like being able to use the immediate-mode style despite iced being a retained-mode framework. My rationale, for what it's worth, is as follows:
I'll admit, it feels a little like we're abusing the iced library, hooking directly into its layout and rendering systems and bypassing the entire "front end" API, and maybe over time the vision of iced will diverge too much for this "immediate iced" to be maintainable - but for now, it handles that without even breaking a sweat, and the more recent work on the iced library points toward, not away from, support for "just the widgets" or "just the renderers". They are all distinct sub-crates now. So, yes, bevy_iced is iced without |
Beta Was this translation helpful? Give feedback.
-
@focustense does the iced project know about this use case? It would be sad if they didn't and made some architectural change that prevented this mode of use from working if it could have been avoided. |
Beta Was this translation helpful? Give feedback.
-
I've checked how update and view works in iced. They do not run unless user acts. Update iterates over bevy event, so I don't think that has any overhead. But view recalculates each frame as it is a system and that feels wrong.
Thinking about it, most bevy way of doing it could be using run conditions.
Other option would be removing the system and using a struct just like how iced does and with systems to propogate updates or run view function. Then that struct could decide to recalculate view or use cached one.
What do you think? Btw, I'm spamming with issues but I hope you are available. 😅 I could experiment with it if you are busy.
Beta Was this translation helpful? Give feedback.
All reactions