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

Allow for Widgets to be set within an applications update stage (and allow for arbitrary update rates). #509

Closed
3 of 5 tasks
mitchmindtree opened this issue Jul 14, 2015 · 0 comments

Comments

@mitchmindtree
Copy link
Contributor

I've had a few people raise the concern that it feels strange and non-idiomatic to update all widgets every draw aka render stage, which I totally understand.

Following all of the recent changes within conrod, i'm realising that it should be very easy to allow a user to instead call all of the widgets within the update stage, and then only call ui.draw in the draw stage. This feels a lot more idiomatic while still retaining the current immediate-mode ease of use. It will allow users to set arbitrary update rates etc. It will also allow us to add methods along the lines of only_update/redraw_on_input, which would allow a user to say that they only want the UI to update/redraw if being interacted with. Atm we're redrawing every frame which is hands down conrod's biggest bottleneck right now, but with this change conrod would be almost free unless being interacted with.

  • Remove error warning about multiple updates per render.
  • Review handle_event (might need to move some stuff from render event to update).
  • Add something like Ui::only_update/redraw_on_input.
  • Add a method for returning the Ui's drawable Element. This could be an alternative to Ui::draw and would allow for conrod to run on a separate thread, etc.
  • Change examples to set widgets in update stage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant