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

Pass ScreenDescriptor to egui_wgpu::CallbackTrait::prepare #3960

Merged

Conversation

StratusFearMe21
Copy link
Contributor

@StratusFearMe21 StratusFearMe21 commented Feb 4, 2024

glyphon requires the screen resolution during the prepare stage, and passing that to the callback's prepare function seems pretty trivial.

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Looks good, but one small nit: I think the screen descriptor should come before the mutable parameters to give the parameters a more logical order

@emilk emilk added the egui-wgpu label Feb 5, 2024
@emilk emilk merged commit 7a6d80c into emilk:master Feb 5, 2024
19 of 20 checks passed
@StratusFearMe21 StratusFearMe21 deleted the wgpu-callback-pass-screen-descriptor branch February 5, 2024 11:54
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
…#3960)

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

`glyphon` requires the screen resolution during the `prepare` stage, and
passing that to the callback's `prepare` function seems pretty trivial.

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants