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

Headless Context cannot be created without EventsLoop #1090

Closed
Osspial opened this issue Dec 6, 2018 · 5 comments
Closed

Headless Context cannot be created without EventsLoop #1090

Osspial opened this issue Dec 6, 2018 · 5 comments

Comments

@Osspial
Copy link
Contributor

Osspial commented Dec 6, 2018

After the changes in #1029, headless Contexts cannot be created without creating an EventsLoop. This is a small step back from the previous API, which let you do so without a corresponding EventsLoop. How necessary is this change? If we can allow headless Context creation without EventsLoop creation, we should probably allow it.

cc @zegentzy

@goddessfreya
Copy link
Contributor

goddessfreya commented Dec 6, 2018

Windows was previously making the EventsLoops silently: see here, now it's just your responsibility to make it.

IOS never did support headless stuff: see here, nor did emscripten, see here

MacOS does not currently use the passed EventsLoop, see here. Nor does android: see here.

Additionally, OsMesaContext doesn't need an EventsLoop either (see here), however, please note that when shareable_with_windowed_contexts is true, we instead use the hidden window method, which does need an EventsLoop.

I guess we could accept an Option<EventsLoop> instead of an EventsLoop for headless contexts, however, in most platforms 'None' will just lead to a panic. I won't be available till this weekend I think, but I imagine this change would be trivial.

@Osspial
Copy link
Contributor Author

Osspial commented Dec 6, 2018

Thanks for the explanation! It doesn't look like there's a good reason to support this then, so I'll close this.

@Osspial Osspial closed this as completed Dec 6, 2018
@unlimitedbacon
Copy link
Contributor

Can this be reconsidered? I'd like to run my program using an OSMesa context in an environement where neither X11 nor Wayland are available. As far as I can tell this is not possible right now since an EventsLoop is required.

@goddessfreya
Copy link
Contributor

@unlimitedbacon That was an oversight... sorry. Fixed at #1058

@unlimitedbacon
Copy link
Contributor

Thank you

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

No branches or pull requests

3 participants