-
Notifications
You must be signed in to change notification settings - Fork 143
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
Migrate examples to winit's new "app" API #626
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.
This still works for me. Thanks!
Are you planning on also applying this to the with_winit
example, or should we just land this as-is?
examples/simple/src/main.rs
Outdated
|
||
// The vello RenderContext which is a global context that lasts for the lifetime of the application | ||
let mut render_cx = RenderContext::new(); | ||
struct RenderStateWithContext<'s> { |
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.
I think we should rename this to something which describes what it is for, rather than what it contains. E.g. SimpleVelloApp
?
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.
Thanks for the suggestion! SimpleVelloApp
sounds better.
Thanks, I think I can address it in this pull request. |
Sorry, I tried
Here's the migrated code of |
Hmm. I'll land this then. Would you mind making a draft follow-up PR with those changes? |
Sure, I will! |
Second round of #626 Currently, this crashes with the following on my local, so I think I'm doing something wrong. ``` Running `target\debug\with_winit_bin.exe` [2024-07-15T15:33:30.317Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)] loader_scanned_icd_add: Driver C:\Windows\System32\DriverStore\FileRepository\u0379858.inf_amd64_1719b9caae095668\B377432\.\amdvlk64.dll says it supports interface version 6 but still exports core entrypoints (Policy #LDP_DRIVER_6) [2024-07-15T15:33:30.318Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x1ca928fbea0, name: ?) Initialising in parallel using 14 threads Parsed svg Ghostscript_Tiger in 8.3298ms Encoded svg Ghostscript_Tiger in 893.9µs thread 'main' panicked at examples\with_winit\src\lib.rs:511:22: failed to get surface texture: Timeout note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace error: process didn't exit successfully: `target\debug\with_winit_bin.exe` (exit code: 101) ```
A followup of #559
I see #559 (comment) indicates there's some plan of more significant rewrite, so please feel free to close this. This is mainly my practice of migration to winit's new API.
cf. changelog