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

Refactor examples to remove use of deprecated winit functions #206

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

apekros
Copy link
Contributor

@apekros apekros commented Nov 21, 2024

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

@kvark
Copy link
Owner

kvark commented Nov 23, 2024

Ideally, the struct Example doesn't care about the window, yeah. If you can prototype the (more invasive) alternative that would be awesome!

@apekros
Copy link
Contributor Author

apekros commented Nov 26, 2024

Ideally, the struct Example doesn'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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants