The glutin was rewritten from the ground to solve its previous design pitfalls. If this rewrite is a surprise to you, it was on the radar for a long time before @kchibisov started seriously maintaining this crate. Previously there was an attempt to do so by @goddessfreya in https://github.com/rust-windowing/glutin/tree/v0.23_reworks , but unfortunately she disappeared and we can only hope that she is alright. While her code wasn't complete the comments about some edge cases were very helpful and saved a lot of time.
To outline some major issues glutin had and that were solved:
The maintenance was hard, since the code was a bag of glue around winit and GL shenanigans.
Very hard to use with anything other than winit.
MT safety was wrong and it was causing issues on Wayland(EGL in general), since some stuff ended up Send + Sync while it shouldn't due to other platfroms.
Impossible for specialized use, like EGL only features.
Configuration picking is a mess due to building everything at once(Display, Config, Surface, and Context) leading to complex fallback behavior downsteam.
etc.
The glutin 0.30.0 is more low-level now and its core concepts are now around Display, Config, Context, and Surface, using raw window handle for window related config creation and display creation.
Each platform EGL, GLX, WGL, and CGL could be used on their own and every backend/platform are optional.
For an example of bootstrapping and working with the new glutin we strongly advise to look at the example.
Unfortunately, not every platform was ported to glutin 0.30.0. The ios, surfaceless, and os-mesa platforms were removed due to
the lack of maintenance, however if there's a desire and maintainer for such platforms we'd warmly welcome them and guide through the code.
More formal changelog:
This version of glutin has been rewritten from the ground and no longer depends on winit, the raw-window-handle is now used instead of it.
The Api is now built around Display, Surface, Config, and Surface. For more info see crate documentation and examples.
Breaking: Bump MSRV from 1.57 to 1.60.
The ios support was removed for the lack of maintainance for now. In case there's a need for it, contributions are welcome.
The context creation is no longer limited to winit's supported platforms.
The underlying Api providers are publically exposed now, so glutin could be used with just e.g. EGL.
Fixed soundness issues with Surface MT safety, since before EGLSurface could be sent to a different thread, which is not safe.
Fallback to Surface::swap_buffers when Surface::swap_buffers_with_damage is not supported on EGL.
iOS, os-mesa, and surfaceless platforms were removed.
This version of glutin has been rewritten from the ground and no longer depends on winit, the raw-window-handle is now used instead of it.
The Api is now built around Display, Surface, Config, and Surface. For more info see crate documentation and examples.
Breaking: Bump MSRV from 1.57 to 1.60.
The ios support was removed for the lack of maintainance for now. In case there's a need for it, contributions are welcome.
The context creation is no longer limited to winit's supported platforms.
The underlying Api providers are publically exposed now, so glutin could be used with just e.g. EGL.
Fixed soundness issues with Surface MT safety, since before EGLSurface could be sent to a different thread, which is not safe.
Fallback to Surface::swap_buffers when Surface::swap_buffers_with_damage is not supported on EGL.
Version 0.29.1 (2022-08-10)
Fix build failures when building from crates.io
Version 0.29.0 (2022-07-30)
Fix crash when creating OpenGLES context without explicit version.
Add buffer_age method on WindowedContext.
Return an Err instead of panicking when surfaceless GLX context creation fails on Linux.
Fix compilation on Android:
Switch from StaticStructGenerator to StructGenerator to dynamically load symbols.
Replace android_glue dependency with raw-window-handle, and remove broken lifecycle event handling.
Glutin can now be used on Android, however, the application must ensure it only creates the Context following a winit Event::Resumed event, and destroys the Context in response to a Event::Suspended event.
Updated winit dependency to 0.27.0. See winit's CHANGELOG for more info.
On Windows, build_raw_context now uses isize for hwnd to follow winit change.
Version 0.28.0 (2021-12-02)
On Windows, fixed a panic for headless contexts because of active drag-and-drop (OleInitialize failed! Result was: RPC_E_CHANGED_MODE)
Updated winit dependency to 0.26.0. See winit's CHANGELOG for more info.
Remove emscripten support leftover.
Version 0.27.0 (2021-06-01)
Updated winit dependency to 0.25.0. See winit's CHANGELOG for more info.
Version 0.26.0 (2020-12-10)
Updated winit dependency to 0.24.0. See winit's CHANGELOG for more info.
Version 0.25.1 (2020-10-10)
X11 and Wayland are now optional features (enabled by default)
Version 0.25.0 (2020-10-02)
Updated winit dependency to 0.23.0. See winit's CHANGELOG for more info.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on glutin to permit the latest version.
Release notes
Sourced from glutin's releases.
Changelog
Sourced from glutin's changelog.
... (truncated)
Commits
06045c7
Glutin version 0.30.0ba8ec0f
api: don't overwrite user specified context version2ea7ded
chore: switch link to new matrix rooma09d4c7
chore: pin wayland-sysb49b72c
Glutin version v0.30.0-beta.379be505
chore: enable doc_auto_cfgeb276dc
api: increase display features size7bddcb5
glx: fix crash in deref in Surface::set_swap_interval7690448
glx: fix attribute list termination1a5f3d1
api: addGlDisplay::supported_features
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)