Skip to content

Commit ac9f93b

Browse files
committed
[wgpu-hal] Make raw-gles runnable on X11 and Wayland platforms again
PR gfx-rs#6150 suffered a much larger rebase "hell" than I anticipated. On my Linux box I made this change, but lost it while force-pushing from Windows (and created some other compiler errors while at it...). By disabling all features on `glutin`/`glutin-winit` (the latter only uses `x11`, and only forwards `wayland` to `glutin`) we may have dropped a lot of "unused" dependencies for other GL backends, but also made the crate unable to import X11 (Xlib/Xcb) and Wayland handles into EGL. Also import the missing `glutin::context::Version` struct again which was added last-minute to gfx-rs#6150 (to make sure my Intel card on Windows creates a GLES 3.0+ instead of GLES 2.0 context) while the import was accidentally squashed into gfx-rs#6152 (not merged yet).
1 parent 5deaef3 commit ac9f93b

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ By @teoxoy [#6134](https://github.com/gfx-rs/wgpu/pull/6134).
111111
#### GLES
112112

113113
- Replace `winapi` code in WGL wrapper to use the `windows` crate. By @MarijnS95 in [#6006](https://github.com/gfx-rs/wgpu/pull/6006)
114+
- Update `glutin` to `0.31` with `glutin-winit` crate. By @MarijnS95 in [#6150](https://github.com/gfx-rs/wgpu/pull/6150) and [#6176](https://github.com/gfx-rs/wgpu/pull/6176)
114115

115116
#### DX12
116117

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wgpu-hal/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ glam.workspace = true # for ray-traced-triangle example
208208
winit.workspace = true # for "halmark" example
209209

210210
[target.'cfg(not(any(target_arch = "wasm32", windows, target_os = "ios")))'.dev-dependencies]
211-
glutin-winit = { workspace = true, features = ["egl"] } # for "raw-gles" example
212-
glutin = { workspace = true, features = ["egl"] } # for "raw-gles" example
211+
glutin-winit = { workspace = true, features = ["egl", "wayland", "x11"] } # for "raw-gles" example
212+
glutin = { workspace = true, features = ["egl", "wayland", "x11"] } # for "raw-gles" example
213213
rwh_05 = { version = "0.5", package = "raw-window-handle" } # temporary compatibility for glutin-winit in "raw-gles" example
214214
winit = { workspace = true, features = ["rwh_05"] } # for "raw-gles" example

wgpu-hal/examples/raw-gles.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn main() {
1616

1717
use glutin::{
1818
config::GlConfig as _,
19-
context::{NotCurrentGlContext as _, PossiblyCurrentGlContext as _},
19+
context::{NotCurrentGlContext as _, PossiblyCurrentGlContext as _, Version},
2020
display::{GetGlDisplay as _, GlDisplay as _},
2121
surface::GlSurface as _,
2222
};

0 commit comments

Comments
 (0)