Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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