-
Notifications
You must be signed in to change notification settings - Fork 370
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
use re_renderer to draw 2d scenes #465
Conversation
render image with re_renderer
transparency is a bit wonky
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niiice! we're getting close.
But I would feel better if #456 could be done before we merge this, so we can be sure we're not leaking GPU resources.
@@ -560,6 +605,7 @@ fn view_2d_scrollable( | |||
check_hovering(*instance_hash, min_dist_sq.sqrt()); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only reason rendering and hovering was coupled together was to save on doing ui_from_space
twice. Now that that has been fixed, it would be nice to separate rendering from picking completely!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed! Let's do so in a follow-up
Use re_renderer instead of epaint for everything the 2d scene renders except text labels (and their boxes).
Differences are quite subtle!
before - after
after - before
after - before
(sorry for randomized order oops..)
Added transparency-enabled tinting to re_renderer to enable image layering as we had it before.
Coordinates passed to re_renderer draw data objects are all in scene coordinates! I.e. the camera/projection setup we're passing the the
ViewBuilder
is doing the job to go all the way from scene to pixel coordinates for us!Direct follow-up todos:
TODO before going in:
(Fixes most of #382, but I'll close only after those additional items)
Checklist
CHANGELOG.md
(if this is a big enough change to warrant it)