-
Notifications
You must be signed in to change notification settings - Fork 69
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
Upgrade to egui v0.25.0 and miniquad v0.4 #65
Conversation
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.
Thank you! Looks good, except for the pixels-per-point thing
src/lib.rs
Outdated
textures_delta, | ||
shapes, | ||
pixels_per_point, //TODO not handling change in pixels per point (check zooming in/out behavior in egui) |
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.
This is egui telling you what its (current) definition of a "point" is. It is the value that should be passed to tessellate
src/lib.rs
Outdated
if let Some(shapes) = self.shapes.take() { | ||
let meshes = self.egui_ctx.tessellate(shapes); | ||
let meshes = self.egui_ctx.tessellate(shapes, self.native_dpi_scale); |
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.
Here we should use the pixels_per_point
reported by egui, because that can differ from native_dpi_scale
if the user has bit Ctrl+/-
Give me about a week, I am about to publish miniquad-0.4 without alpha. (yes, I was about to publish it since forever, but now I really am!) |
Bit hard to zoom in and out when equals and minus keys aren't being passed to egui!
With all 3 of those things fixed, you can now zoom the So this PR is now B+ quality, with the only remaining thing being the gap between the gradients (which, again, I can live with). |
Btw, a new egui is coming next week too :) |
anyway, miniquad is released, no more github/crates differences nor -alpha versions! |
I could have sworn that I had already fixed it properly previously, but zooming via the slider wasn't working. But now it is. Let's hope I'm not hallucinating this time.
Yay! I've updated this PR to target miniquad 0.4.0 now, so: time to hit merge? (I know there's egui 0.26 out already, but maybe let's just get this merged first) |
This includes:
0.24.1
and0.25.0
.I've tested a little bit and "things seem to work" - at least the obvious stuff like rendering, mouse and keyboard input handling, etc.
Things I'm not sure about:
High DPI screens support. Egui 0.24.0 revamped how pixels per point is calculated and used. I made a best effort attempt to integrate this correctly but I couldn't find any big picture docs and I don't use a high DPI screen so I'm not sure it's done correctly.And it looks like egui can suggest DPI changes back to the egui backend now as well, based on the user zooming in or something like that? I didn't implement this side of things at all because I don't need it.So.. it's not a rock solid PR, but I'm raising it anyway to save others doing the same work if they don't care about these limitations.