blade
blade copied to clipboard
Refactor examples to remove use of deprecated winit functions
Just a quick draft, as I was not sure if you would be picky about the structure in the examples. I've just refactored the existing Example to be ExampleInner which is now contained within a new Example struct which holds the window/inner. I did this to minimise the amount of changes.
I can however go for a different approach and keep the Example struct, but instantiate everything within new() that does not require a Window, and then have a secondary instantiate (no good name comes to mind right now), that can be called with a window on ApplicationHandler::resumed()
Will await your thoughts before applying this across all the examples
Ideally, the struct Example doesn't care about the window, yeah. If you can prototype the (more invasive) alternative that would be awesome!
Ideally, the
struct Exampledoesn't care about the window, yeah. If you can prototype the (more invasive) alternative that would be awesome!
I'll look into if I can do it without the window being contained within Example but looks like that's what the winit team envisions it as being in their examples.