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

Support multiple windows #191

Open
HybridEidolon opened this issue Aug 3, 2015 · 2 comments
Open

Support multiple windows #191

HybridEidolon opened this issue Aug 3, 2015 · 2 comments

Comments

@HybridEidolon
Copy link
Contributor

SDL2 doesn't delineate events between windows in the video subsystem, so when one Sdl2Window gets the event pump for polling events, it will capture events from all existing SDL2 Windows.

@bvssvni
Copy link
Member

bvssvni commented Aug 3, 2015

I see. This becomes problematic when WindowSettings is the only thing passed to the constructor.

I guess some sharing mechanism is required to make this work. Perhaps we should have a way of passing in custom information to WindowSettings?

WindowSettings<T = ()>

@HybridEidolon
Copy link
Contributor Author

I think the only way to handle this is to add an additional event pump layer in front of SDL's that the calling code has to set up and poll, and send those events into each window manually. It wouldn't be possible to toss a window on each thread and have them handle their own event polling with the constraints of the SDL event system, even though it allows for polling on threads other than the main one.

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

No branches or pull requests

2 participants