wgpu template: wgpu 27.0.1 -> 29.0.1, winit FIXME#15
wgpu template: wgpu 27.0.1 -> 29.0.1, winit FIXME#15goldnor wants to merge 5 commits intoRust-GPU:mainfrom
Conversation
|
The CI will fail, you have to run |
|
Oh yea if you deleted a file, |
There was a problem hiding this comment.
Thanks for your patch, but there's a few things I'd like slightly differently. I've never written it down anywhere (that's on me), but I made both MyRenderer and MySwapchain completely independent from each other on purpose. For MyRenderer, that could allow automated testing later down the line, since it just needs an image to draw to. MySwapchain isn't as straight forward, but it allows you to in theory reuse it with different renderers.
So I've taken your changes here and cleaned them up myself and split it into two different PRs, from where they'll live on in main soon :D
- update wgpu 27 -> 29#16, which is largely your changes
- winit 30 event loop#17. I rewrote it quite a bit, keeping the swapchain structure while updating it to the new event loop system with relatively minimal changes, and also updating the ash example.
I'd just close this PR and merge the other ones, if that's ok for you. I also have a rust-gpu upgrade locally I'll push soon.
|
This totally makes sense. I didn’t pay enough attention to how you structured the code, though I did feel a bit bad about changing the generic rendering method that allows for different renderers. Thanks for taking the time to clean things up after me ^^ |
|
No worries, updating the templates was on my todo list for way too long already, since December there were a few changes that haven't made it to the templates, specifically the new |
This PR updates wgpu and completes the migration to winit 0.30.13, resolving existing FIXME comments and aligning the implementation with the latest upstream examples. The migration was primarily guided by the official wgpu example.
ApplicationHandlertrait.Surface::get_current_texturenow returnsCurrentSurfaceTextureenum, which simplifies the oldMySwapchainManager::rendermethod (nowState::render)InstanceDescriptorinitialization APIs and display handle changes:Instanceis now recreated onApplicationHandler::resumed, as recommended for platforms with lifecycle management constraints (e.g. mobile; seeApplicationHandler::resumed)