Releases: rust-windowing/glutin
Glutin Version v0.30.6
- Fixed handling of
*_base
extensions with EGL.
Glutin Version v0.30.5
- Fixed EGL/GLX display initialization when the provided raw-window-handle has an unknown visual_id.
- Fixed EGL always returning
None
forx11_visual()
. - Fixed GLX error handling assuming that
XError
's will arrive like they should on X11. - Fixed EGL window/pixmap creation when using legacy path.
Glutin Version v0.30.4
- Fixed EGL display initialization with XcbDisplayHandle.
- Fixed EGL/GLX
Surface::width
returning the height instead of the width. - On GLX, fixed handling of errors not directly requested by glutin.
- Added
GlConfig::hardware_accelerated
to check if the config is hardware accelerated. - Added
GlContext::context_api
to get theContextApi
used by the context. - Added missing implementations of
Surface::{width,height}
for WGL/CGL - Fixed crash when accessing context from the off-thread on macOS.
- Clarified that
make_{,not}_current()
,GlSurface::width()
,GlSurface::height()
, andGlSurface::resize()
could block on macOS.
Glutin Version v0.30.3
- Fixed wrong amount of rects committed in
Surface::swap_buffers_with_damage
with EGL. - Added missing
Eq
,PartialEq
, andHash
impls forsurface::Rect
.
Glutin Version v0.30.2
- Fixed robust context creation with EGL.
- Moved to stable version of
wayland-sys
. - Allow offline renderers with CGL.
- Fixed an error when compiling the EGL backend with only one of Wayland and X11 enabled.
Glutin Version v0.30.1
- Added new
glutin-winit
crate to help bootstrapping newglutin
withwinit
. - Added
EGLDevice
wrappers for EGL. - Added EGL dependent api to make a context current without a surface.
- Added
supports_transparency
onGlConfig
. - On GLX, try all extensions when setting vsync.
- On WGL, fixed that
Surface::swap_buffers
takes longer with every call caused by frequent calls of the win32 functionHDC GetDC(HWND hWnd)
.
Glutin Version v0.30.0
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 onwinit
, theraw-window-handle
is now used instead of it. - The Api is now built around
Display
,Surface
,Config
, andSurface
. For more info see crate documentation and examples. - Breaking: Bump MSRV from
1.57
to1.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 beforeEGLSurface
could be sent to a different thread, which is not safe. - Fallback to
Surface::swap_buffers
whenSurface::swap_buffers_with_damage
is not supported onEGL
. - iOS, os-mesa, and surfaceless platforms were removed.
Glutin Version v0.30.0-beta.3
Config
doesn't force OpenGLApi
by default.Display::create_context
now uses the most recent availableApi
from theConfig
whenContextApi
is not specified inContextAttributes
.- Breaking:
PossiblyCurrentGlContext::get_proc_address
method was moved toGlDisplay::get_proc_address
. - Breaking:
ConfigTemplateBuilder::with_sample_buffers
now calledConfigTemplateBuilder::with_multisampling
. - Breaking:
GlConfig::sample_buffers
now calledGlConfig::num_samples
and returns the amount of samples in multisample buffer. - Breaking: Bump MSRV from
1.57
to1.60
. - Fix
GlProfile::Core
requesting without explicit version. - Pick the latest available profile on macOS.
- When using
ContextApi::Gles(None)
inContextAttributesBuilder
the latest known supportedmajor
ES version will be picked. - Fix
Eq
implementation forConfig
onCGL
. - Add
GetDisplayExtensions
trait to obtain api display extensions implemented onEGL
,WGL
, andGLX
. - Fallback to
Surface::swap_buffers
whenSurface::swap_buffers_with_damage
is not supported onEGL
. - Add missing
GetGlConfig
implementation forNotCurrentContext
andPossiblyCurrentContext
. - Implement
Clone
for builders. - Breaking: move
DamageRect
intosurface::Rect
. - Add
GlDisplay::version_string
to help with logging the display information. - Rename
NotCurrentGlContext::treat_as_current
toNotCurrentGlContext::treat_as_possibly_current
. - Rename
Display::from_raw
toDisplay::new
. - Added
GlDisplay::supported_features
to allow checking for extensions support beforehand. - Breaking: renamed
ReleaseBehaviour
toReleaseBehavior
. - Fix GLX not working with nvidia binary drivers.
- Fix crash in
glx::surface::Surface::set_swap_interval
.
Glutin Version v0.30.0-beta.2
- macOS: Fix memory leak in
Surface
.
Glutin Version v0.30.0-beta.1
- Replace
winit
dependency withraw-window-handle
. - The Api is now built around
Display
,Surface
,Config
, andSurface
for more info see crate documentation and examples. - 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 beforeEGLSurface
could be sent to a different thread, which is not safe.