Commit graph

22 commits

Author SHA1 Message Date
John Nunley
0bcd2e22a2
breaking: Use raw-window-handle version 0.6
Signed-off-by: John Nunley <dev@notgull.net>
Co-Authored-By: dAxpeDDa <daxpedda@gmail.com>
2023-10-26 19:15:51 -07:00
Ian Douglas Scott
a09e4cf679
Owned pixel buffer for no-copy presentation
This is based on the API that will be used for no-copy presentation. But
wraps it in `set_buffer`.

This also fixes the Wayland buffer code to set `self.width` and
`self.height` on resize, and set the length of the shared memory file
when the buffer is created.

Co-authored-by: jtnunley <jtnunley01@gmail.com>
2023-04-06 10:30:59 +03:00
John Nunley
e5d546ff9e
Update README.md to have a checkmark next to libxcb support (#84) 2023-04-05 11:41:37 -07:00
Ian Douglas Scott
3b9976685c Add run-wasm workspace member, as used in winit
This makes it easy to run examples with the web backend, in the same way
that winit examples are run.
2023-02-23 08:49:36 -08:00
Forest Anderson
f98b8c4e25
Fix changelog link 2023-01-26 17:15:14 -05:00
Ian Douglas Scott
129069996e Split GraphicsContext into Context and Surface
A `Context` is created with a display handle, and a `Surface` is created
with a `&Context` and a window handle. Thus multiple windows can be
created from the same context without duplicating anything that can be
shared. This API is broadly similar to `wgpu` or `glutin`.

On Wayland, the `Context` contains the `EventQueue`, which is shared
between windows, and the `WlShm` global. On X11, `Context::new` checks
for the availability of XShm, and contains a bool representing that as
well as the `XCBConnection`. The shared context data is stored within
the window in an `Arc`.

On other platforms, the display isn't used and `Context` is empty. This
does however test that the display handle has the right type on those
platforms and fail otherwise. Previously the code didn't test that.

Closes https://github.com/rust-windowing/softbuffer/issues/37.
2023-01-06 21:36:53 -08:00
jtnunley
32fc52ab9b Create changelog 2023-01-06 07:48:29 -08:00
Jeremy Soller
11fdcfacd0
Remove notice about fork 2022-12-23 08:24:26 -07:00
Mads Marquart
c9e3652d13 Fix typo 2022-12-23 04:16:55 +01:00
David Johnson
9023b096d7 Updated rest of the code to use softbuffer name instead of swbuf 2022-12-22 18:43:54 -06:00
Azriel Hoh
80b45a9a68 Add rust syntax to readme snippet 2022-12-21 13:55:00 -07:00
Jeremy Soller
9b8641fc07 Make new function take both a HasRawWindowHandle and a HasRawDisplayHandle object 2022-12-20 13:40:54 -07:00
Jeremy Soller
99d63063b6 Take a reference to a window in GraphicsContext::new, like glutin and wgpu 2022-12-20 13:40:54 -07:00
Jeremy Soller
7351d68814
Add Redox/Orbital support 2022-12-20 07:11:09 -07:00
Jeremy Soller
939bcc44d8
Fork to swbuf 2022-12-20 07:07:57 -07:00
David Johnson
08883d76c5 Bumped version to 0.1.1, updated README.md, added changelog to README.md 2022-05-22 18:20:40 -05:00
Liam Murphy
62529c4069 Show web as supported in README 2022-02-23 20:08:16 +11:00
David Johnson
4311b27193 Modified Cargo.toml and README.md to prepare for publication to crates.io 2022-01-19 21:57:09 -06:00
David Johnson
d8087a68a0 Added Wayland support 2022-01-19 21:26:20 -06:00
David Johnson
d4dea5a95f Updated README.md to reflect AppKit support 2022-01-19 00:16:31 -06:00
David Johnson
dc6fc474be Added better error handling 2022-01-16 09:01:02 -06:00
David Johnson
e7b6541de9 Added README.md 2022-01-16 08:43:00 -06:00