Skip to content

examples/window: use softbuffer - #2353

Closed
dhardy wants to merge 2 commits into
rust-windowing:masterfrom
dhardy:softbuffer
Closed

dhardy wants to merge 2 commits into
rust-windowing:masterfrom
dhardy:softbuffer

Conversation

@dhardy

@dhardy dhardy commented Jul 1, 2022

Copy link
Copy Markdown
Contributor

See also #2350, rust-windowing/softbuffer#20.

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

Comment thread examples/window.rs Resolved
@maroider

maroider commented Jul 3, 2022

Copy link
Copy Markdown
Member

The X11-only CI appears to be failing due to a somehow missing waland-client system library. Not sure what's up with that.

@dhardy

dhardy commented Jul 3, 2022

Copy link
Copy Markdown
Contributor Author

softbuffer has this dependency:

wayland-client = {version = "0.29", features = ["use_system_lib"], default_features = false}

I tried adding libwayland-client0 as a dependency... though since winit itself already uses wayland-client with this feature I'm doubtful.

@dhardy

dhardy commented Jul 3, 2022

Copy link
Copy Markdown
Contributor Author

No surprise, that didn't help:

libwayland-client0 is already the newest version (1.18.0-1).

Strangely, its the x11 build that failed.

Running cargo test --no-run --verbose --target x86_64-unknown-linux-gnu --no-default-features --features x11 (what the command reduces to) on my machine (running X11) works.

@maroider

maroider commented Jul 3, 2022 •

Copy link
Copy Markdown
Member

Strangely, its the x11 build that failed.

Indeed. It's quite strange. Could it be that there's some side-effect softbuffer inadvertently relies on when we enable our Wayland deps? I'm not sure if this is particularly likely, but the X11-only build does seem to be the only Linux build consistently failing.

@dhardy dhardy mentioned this pull request Jul 3, 2022
6 tasks done
@i509VCB

i509VCB commented Jul 4, 2022 •

Copy link
Copy Markdown
Contributor

Personally I'd be a little skeptical of using softbuffer as an example as it has some bugs on Wayland. And there is also the maintenance issue as several issues and pull requests have been opened in the last 2 months without any responses.

I do recall we had a winit-blit project, but that never really took off.

@madsmtm

madsmtm commented Dec 21, 2022

Copy link
Copy Markdown
Member

We've forked swbuf under @rust-windowing, so we'll probably want to use that instead - I'll close this for now, esp. also because swbuf doesn't support all of winit's platforms yet (Android and iOS missing), but free to reopen if you update it to use that

@madsmtm madsmtm closed this Dec 22, 2022
@dhardy

dhardy commented Dec 22, 2022

Copy link
Copy Markdown
Contributor Author

Good to hear that there's a maintained fork. If you'd rather see swbuf support more platforms first then I guess there's no point updating this PR for now.

@dhardy
dhardy deleted the softbuffer branch November 4, 2025 12:02
@MarijnS95

Copy link
Copy Markdown
Member

Randomly found this (branch deletion poked the PR), iOS/MacOS are now supported and Android will be soon: rust-windowing/softbuffer#288

Seems like winit now already uses softbuffer in some examples, but disabled it on these platforms for "some reason" :/

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

7 participants