A low-level library for OpenGL context creation, written in pure Rust.
APACHE-2.0 License
Bot releases are hidden (Show)
raw-window-handle
dependency to 0.6
.1.65
to 1.70
.windows-sys
from 0.48.0
to 0.52.0
.Egl
and Glx
raw API functions on Egl
and Glx
displays.GLUTIN_WGL_OPENGL_DLL
environment variable to change OpenGL provider name with WGL.Published by kchibisov 8 months ago
Surface
to be Send
. This makes it consistent with the context, so now they are both Send
but not Sync
.Published by kchibisov 10 months ago
Published by kchibisov 12 months ago
CGLContextObj
having an invalid encoding on newer macOS versions.Published by kchibisov 12 months ago
1.60
to 1.65
.bitflags
which is used as a part of public API was updated to 2.0
..*SurfaceAccessor
traits got removed; their methods now on respective .*GlContext
traits instead.GlContext
trait is now a part of the prelude
.EGLDisplay
when EGL_KHR_display_reference
is present.api::egl::Display::terminate
to terminate the display when glutin doesn't manage it.Robustness::NoError
and debug
attribute when building context.Robustness::NoError
not being properly enabled with GLX/WGL.Published by kchibisov about 1 year ago
X11VisualInfo::visual_id
to get XID
of the visual.Display::create_pbuffer_surface()
no longer sets the invalid RENDER_BUFFER
attribute.Published by kchibisov over 1 year ago
Surface::is_single_buffered
being inversed.Published by kchibisov over 1 year ago
Window
and Pixmap
surface creation.Flush
with KHR_context_flush_control
.Published by kchibisov over 1 year ago
objc2
crate to pull patch update.Published by kchibisov over 1 year ago
*_base
extensions with EGL.Published by kchibisov over 1 year ago
None
for x11_visual()
.XError
's will arrive like they should on X11.Published by kchibisov over 1 year ago
Surface::width
returning the height instead of the width.GlConfig::hardware_accelerated
to check if the config is hardware accelerated.GlContext::context_api
to get the ContextApi
used by the context.Surface::{width,height}
for WGL/CGLmake_{,not}_current()
, GlSurface::width()
, GlSurface::height()
, and GlSurface::resize()
could block on macOS.Published by kchibisov almost 2 years ago
Surface::swap_buffers_with_damage
with EGL.Eq
, PartialEq
, and Hash
impls for surface::Rect
.Published by kchibisov almost 2 years ago
wayland-sys
.Published by kchibisov almost 2 years ago
glutin-winit
crate to help bootstrapping new glutin
with winit
.EGLDevice
wrappers for EGL.supports_transparency
on GlConfig
.Surface::swap_buffers
takes longer with every call caused by frequent calls of the win32 function HDC GetDC(HWND hWnd)
.Published by kchibisov almost 2 years ago
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:
Send
+ Sync
while it shouldn't due to other platfroms.EGL
only features.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:
glutin
has been rewritten from the ground and no longer depends on winit
, the raw-window-handle
is now used instead of it.Display
, Surface
, Config
, and Surface
. For more info see crate documentation and examples.1.57
to 1.60
.EGL
.Surface
MT safety, since before EGLSurface
could be sent to a different thread, which is not safe.Surface::swap_buffers
when Surface::swap_buffers_with_damage
is not supported on EGL
.Published by kchibisov almost 2 years ago
Config
doesn't force OpenGL Api
by default.Display::create_context
now uses the most recent available Api
from the Config
when ContextApi
is not specified in ContextAttributes
.PossiblyCurrentGlContext::get_proc_address
method was moved to GlDisplay::get_proc_address
.ConfigTemplateBuilder::with_sample_buffers
now called ConfigTemplateBuilder::with_multisampling
.GlConfig::sample_buffers
now called GlConfig::num_samples
and returns the amount of samples in multisample buffer.1.57
to 1.60
.GlProfile::Core
requesting without explicit version.ContextApi::Gles(None)
in ContextAttributesBuilder
the latest known supported major
ES version will be picked.Eq
implementation for Config
on CGL
.GetDisplayExtensions
trait to obtain api display extensions implemented on EGL
, WGL
, and GLX
.Surface::swap_buffers
when Surface::swap_buffers_with_damage
is not supported on EGL
.GetGlConfig
implementation for NotCurrentContext
and PossiblyCurrentContext
.Clone
for builders.DamageRect
into surface::Rect
.GlDisplay::version_string
to help with logging the display information.NotCurrentGlContext::treat_as_current
to NotCurrentGlContext::treat_as_possibly_current
.Display::from_raw
to Display::new
.GlDisplay::supported_features
to allow checking for extensions support beforehand.ReleaseBehaviour
to ReleaseBehavior
.glx::surface::Surface::set_swap_interval
.Published by kchibisov about 2 years ago
Surface
.Published by kchibisov about 2 years ago
winit
dependency with raw-window-handle
.Display
, Surface
, Config
, and Surface
for more info see crate documentation and examples.EGL
.Surface
MT safety, since before EGLSurface
could be sent to a different thread, which is not safe.Published by kchibisov about 2 years ago